duplicity.dup_temp module¶
Manage temporary files
- class duplicity.dup_temp.FileobjHooked(fileobj, tdp=None, dirpath=None, partname=None, permname=None, remname=None)[source]¶
Bases:
object
Simulate a file, but add hook on close
- __init__(fileobj, tdp=None, dirpath=None, partname=None, permname=None, remname=None)[source]¶
Initializer. fileobj is the file object to simulate
- property name¶
Return the name of the file
- class duplicity.dup_temp.SrcIter(src)[source]¶
Bases:
object
Iterate over source and return Block of data.
- class duplicity.dup_temp.TempDupPath(base, index=(), parseresults=None)[source]¶
Bases:
DupPath
Like TempPath, but build around DupPath
- class duplicity.dup_temp.TempPath(base, index=())[source]¶
Bases:
Path
Path object used as a temporary file
- duplicity.dup_temp.get_fileobj_duppath(dirpath, partname, permname, remname, overwrite=False)[source]¶
Return a file object open for writing, will write to filename
Data will be processed and written to a temporary file. When the return fileobject is closed, rename to final position. filename must be a recognizable duplicity data file.