Microsoft.Scripting.PlatformAdaptationLayer.OpenInputFileStream C# (CSharp) Method

OpenInputFileStream() public method

public OpenInputFileStream ( string path ) : Stream
path string
return Stream
        public virtual Stream OpenInputFileStream(string path) {
#if !SILVERLIGHT
            return new FileStream(path, FileMode.Open, FileAccess.Read);
#else
            throw new NotImplementedException();
#endif
        }

Same methods

PlatformAdaptationLayer::OpenInputFileStream ( string path, FileMode mode, FileAccess access, FileShare share ) : Stream
PlatformAdaptationLayer::OpenInputFileStream ( string path, FileMode mode, FileAccess access, FileShare share, int bufferSize ) : Stream

Usage Example

コード例 #1
0
ファイル: _fileio.cs プロジェクト: andreakn/ironruby
 private static Stream OpenFile(CodeContext context, PlatformAdaptationLayer pal, string name, FileMode fileMode, FileAccess fileAccess, FileShare fileShare) {
     try {
         return pal.OpenInputFileStream(name, fileMode, fileAccess, fileShare);
     } catch (UnauthorizedAccessException e) {
         throw PythonFile.ToIoException(context, name, e);
     } catch (IOException e) {
         PythonFile.AddFilename(context, name, e);
         throw e;
     }
 }
All Usage Examples Of Microsoft.Scripting.PlatformAdaptationLayer::OpenInputFileStream