SBFile#
See also
SAMSON SDK: SBDDocumentFile
- class samson.SBFile(*args, **kwargs)#
Bases:
SBNode
This class describes a file.
Overloaded function.
__init__(self: samson.SBFile) -> None
Constructs a file.
__init__(self: samson.SBFile, name: str) -> None
Constructs a file with the given name.
__init__(self: samson.SBFile, name: str, contents: str) -> None
Constructs a file with the given name and contents.
__init__(self: samson.SBFile, name: str, contents: SBCContainerVector<unsigned char>) -> None
Constructs a file with the given name and contents.
- getCreationDate(self: samson.SBFile) samson.SBDateTime #
Returns the creation date (in SAMSON).
- Returns:
The creation date time
- Return type:
- getLastAccessDate(self: samson.SBFile) samson.SBDateTime #
Returns the last access date (in SAMSON).
- Returns:
The last access date
- Return type:
- getLastModificationDate(self: samson.SBFile) samson.SBDateTime #
Returns the last modification date (in SAMSON).
- Returns:
The last modification date
- Return type:
- getNextFile(self: samson.SBFile) samson.SBFile #
Returns the next file.
- getPreviousFile(self: samson.SBFile) samson.SBFile #
Returns the previous file.
- getSize(self: samson.SBFile) int #
Returns the file size
- getSizeString(self: samson.SBFile) str #
Returns the file size as a user-friendly string
- getText(self: samson.SBFile) str #
Returns the contents of the file as a string
- setText(self: samson.SBFile, arg0: str) None #
Sets the contents of the file from a string
- property executable#
Whether the file’s the file is executable directly (only for Python scripts) or not.