Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
 def netnormpath(path):
     """
 Normalizes a path
 """
     return Init_ABFS.normpath(path)
Ejemplo n.º 3
0
 def normpath(path):
     """
 Normalizes a path
 """
     resp = Init_ABFS.normpath(path)
     return resp