예제 #1
0
파일: server.py 프로젝트: benroeder/swftp
 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
예제 #2
0
파일: server.py 프로젝트: sirkonst/swftp
 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)
예제 #3
0
파일: server.py 프로젝트: Libreno/swftp
 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
예제 #4
0
파일: server.py 프로젝트: joonp/swftp
 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)
예제 #5
0
 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