def __init__(self, fs, path, mode="r"): self.fs = fs self.path = normpath(path) self.pos = 0 self.closed = False if mode != "r": raise Exception( "buffering and write support not yet implemented") # NYI stat = self._stat() if stat is None: raise IOError(errno.ENOENT, "No such file or directory: '%s'" % path) if stat.isDir: raise IOError(errno.EISDIR, "Is a directory: '%s'" % path)
def netnormpath(path): """ Normalizes a path """ return Init_ABFS.normpath(path)
def normpath(path): """ Normalizes a path """ resp = Init_ABFS.normpath(path) return resp