Пример #1
0
 def size(self, fn):  # type: (unicode) -> bool
     collection, rest = self.get_collection(fn)
     if collection is not None:
         if rest:
             arvfile = collection.find(rest)
             if isinstance(arvfile, arvados.arvfile.ArvadosFile):
                 return arvfile.size()
         raise IOError(errno.EINVAL, "Not a path to a file %s" % (fn))
     else:
         return super(CollectionFsAccess, self).size(fn)
Пример #2
0
 def size(self, fn):  # type: (unicode) -> bool
     collection, rest = self.get_collection(fn)
     if collection is not None:
         if rest:
             arvfile = collection.find(rest)
             if isinstance(arvfile, arvados.arvfile.ArvadosFile):
                 return arvfile.size()
         raise IOError(errno.EINVAL, "Not a path to a file %s" % (fn))
     else:
         return super(CollectionFsAccess, self).size(fn)