Package daklib :: Module policy :: Class UploadCopy
[hide private]
[frames] | no frames]

Class UploadCopy

source code

export a policy queue upload

This class can be used in a with-statement:

  with UploadCopy(...) as copy:
     ...

Doing so will provide a temporary copy of the upload in the directory given by the directory attribute. The copy will be removed on leaving the with-block.

Instance Methods [hide private]
 
__init__(self, upload, group=None)
initializer
source code
 
export(self, directory, mode=None, symlink=True, ignore_existing=False)
export a copy of the upload
source code
 
__enter__(self) source code
 
__exit__(self, *args) source code
Method Details [hide private]

__init__(self, upload, group=None)
(Constructor)

source code 

initializer

Parameters:

export(self, directory, mode=None, symlink=True, ignore_existing=False)

source code 

export a copy of the upload

Parameters:
  • directory (str) - directory to export to
  • mode (int) - permissions to use for the copied files
  • symlink (bool) - use symlinks instead of copying the files
  • ignore_existing (bool) - ignore already existing files