Пример #1
0
 def makedirs(self, remoteFolder):
     """ Like os.makedirs remotely. """
     if len(remoteFolder) and not self.exists(remoteFolder):
         log.info('RemotePath.makedirs, path: %s' % remoteFolder)
         parent = dirname(remoteFolder)
         # if have parent and it doen't exist, create it recursively
         if len(parent) and not self.exists(parent):
             self.makedirs(parent)
         self.sftp.mkdir(remoteFolder)
Пример #2
0
 def makedirs(self, remoteFolder):
     """ Like os.makedirs remotely. """
     if len(remoteFolder) and not self.exists(remoteFolder):
         log.info('RemotePath.makedirs, path: %s' % remoteFolder)
         parent = dirname(remoteFolder)
         # if have parent and it doen't exist, create it recursively
         if len(parent) and not self.exists(parent):
             self.makedirs(parent)
         self.sftp.mkdir(remoteFolder)
Пример #3
0
 def makeFilePath(self, *remoteFiles):
     """ Create the remote folder path for remoteFiles. """
     self.makePath(*[dirname(r) for r in remoteFiles])
Пример #4
0
 def makeFilePath(self, *remoteFiles):
     """ Create the remote folder path for remoteFiles. """
     self.makePath(*[dirname(r) for r in remoteFiles])