VersionObject
Bases:
FileObject
Represents one Version object in DocuShare.
- Parameters
docushare (DocuShare) – The DocuShare site that this object belongs to.
hdl (Handle) – The DocuShare handle that represents this object. The type must be
HandleType.Version
.title (str) – Title of this version.
filename (str) – File name of this version.
version_number (int) – Version number of this version.
Attributes Summary
The DocuShare site that this object belongs to.
URL to download this document.
File name of this document.
The DocuShare handle that represents this object.
Title of this document.
version number (a sequential number)
Methods Summary
download
([path, size_for_progress_report])Download this document from the DocuShare site to the local storage.
Attributes Documentation
The DocuShare site that this object belongs to.
- Type
URL to download this document.
- Type
File name of this document.
- Type
The DocuShare handle that represents this object.
- Type
Title of this document.
- Type
version number (a sequential number)
- Type
Methods Documentation
Download this document from the DocuShare site to the local storage.
- Parameters
path (path-like object or None) – If it is None, this method downloads the document as a file in the current directory and the file name is determined as suggested by the DocuShare site. If it is a directory path, the document is downloaded as a file in the given directory and the file name is determined as suggested by the DocuShare site. If the given path is not a directory or does not exist, the document is downloaded as a file to the given path.
size_for_progress_report (int) – This method shows a progress bar using tqdm <https://tqdm.github.io/> if the file size is more than the specified size in bytes.
- Returns
Path to the downloaded file.
- Return type
path-like object