Scratch#

class pyedb.generic.filesystem.Scratch(local_path, permission=511, volatile=False)#

Overview#

remove

copyfile

Copy a file to the scratch directory. The target filename is optional.

copyfolder

Parameters:

Import detail#

from pyedb.generic.filesystem import Scratch

Property detail#

property Scratch.path#
property Scratch.is_empty#

Method detail#

Scratch.remove()#
Scratch.copyfile(src_file, dst_filename=None)#

Copy a file to the scratch directory. The target filename is optional. If omitted, the target file name is identical to the source file name.

Parameters:
src_filestr

Source file with fullpath.

dst_filenamestr, optional

Destination filename with the extension. The default is None, in which case the destination file is given the same name as the source file.

Returns:
dst_filestr

Full path and file name of the copied file.

Scratch.copyfolder(src_folder, destfolder=None)#
Parameters:
src_folder
destfolder
Returns:
Scratch.__enter__()#
Scratch.__exit__(ex_type, ex_value, ex_traceback)#