SBFile#

See also

SAMSON SDK: SBDDocumentFile

class samson.SBFile(*args, **kwargs)#

Bases: SBNode

This class describes a file.

Overloaded function.

  1. __init__(self: samson.SBFile) -> None

Constructs a file.

  1. __init__(self: samson.SBFile, name: str) -> None

Constructs a file with the given name.

  1. __init__(self: samson.SBFile, name: str, contents: str) -> None

Constructs a file with the given name and contents.

  1. __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:

samson.SBDateTime

getLastAccessDate(self: samson.SBFile) samson.SBDateTime#

Returns the last access date (in SAMSON).

Returns:

The last access date

Return type:

samson.SBDateTime

getLastModificationDate(self: samson.SBFile) samson.SBDateTime#

Returns the last modification date (in SAMSON).

Returns:

The last modification date

Return type:

samson.SBDateTime

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 UUID#

The file’s UUID.

property executable#

Whether the file’s the file is executable directly (only for Python scripts) or not.