OpenInputFileStream() 공개 메소드

public OpenInputFileStream ( string path ) : Stream
path string
리턴 Stream
예제 #1
0
 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;
     }
 }
 internal Stream GetStream(string path)
 {
     return(_pal.OpenInputFileStream(path));
 }
예제 #3
0
 private static Stream OpenFile(PlatformAdaptationLayer pal, string name, FileMode fileMode, FileAccess fileAccess, FileShare fileShare) {
     if (pal.DirectoryExists(name)) {
         // TODO: properly set errno
         throw PythonOps.IOError("[Errno 13] Permission denied");
     }
     return pal.OpenInputFileStream(name, fileMode, fileAccess, fileShare);
 }