def realPath(self, path): container, obj = obj_to_path(path) real_path = '/' if container: real_path += container if obj: real_path += '/' + obj return real_path
def openForWriting(self, path): self.log_command('openForWriting', path) fullpath = self._fullpath(path) container, obj = obj_to_path(fullpath) if not container or not obj: raise CmdNotImplementedForArgError( 'Cannot upload files to root directory.') f = SwiftWriteFile(self.swiftfilesystem, fullpath) return defer.succeed(f)
def realPath(self, path): """ Normalizes a filepath """ container, obj = obj_to_path(path) real_path = '/' if container: real_path += container if obj: real_path += '/' + obj return real_path