Package ts3widgets :: Module filetransfer :: Class FileCollector
[hide private]
[frames] | no frames]

Class FileCollector

source code

         object --+    
                  |    
pytson.Translatable --+
                      |
                     FileCollector

Collects all files recursively from TS3 filetransfer directories with their corresponding download path. Emits a signal collectionFinished with a list of tuples(str, list[File]) containing the download dir and a list of files. The signal collectionError(str, int) is emitted on error with the errorstring and the errorcode.

Instance Methods [hide private]
 
__init__(self, schid, cid, password, rootdir)
Instantiates a new object.
source code
 
__del__(self) source code
 
addFiles(self, files)
Manually adds a list of files to the collection (emitted with the rootdir)
source code
 
collect(self, dirs)
Starts collecting files from a list of directories
source code
 
onServerErrorEvent(self, schid, errorMessage, error, returnCode, extraMessage) source code
 
onFileListEvent(self, schid, channelID, path, name, size, datetime, atype, incompletesize, returnCode) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from pytson.Translatable (private): _tr

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, schid, cid, password, rootdir)
(Constructor)

source code 

Instantiates a new object.

Parameters:
  • schid (int) - the id of the serverconnection handler
  • cid (int) - the id of the channel
  • password (str) - the password of the channel
  • rootdir (str) - the root download directory
Overrides: object.__init__

addFiles(self, files)

source code 

Manually adds a list of files to the collection (emitted with the rootdir)

Parameters:
  • files (list(File)) - list of files to emit

collect(self, dirs)

source code 

Starts collecting files from a list of directories

Parameters:
  • dirs (list(File)) - list of directories