opihiexarata.library.temporary module

This is where functions dealing with the temporary files and temporary directory of the OpihiExarata system. Temporary files are helpful because they may also contain information useful to the user. These functions thus serve the same purpose as Python’s build-in functions, but it is more restricted to OpihiExarata and it is also more persistant.

opihiexarata.library.temporary.create_temporary_directory(unique: bool = None) None[source]

Make the temporary directory.

Parameters:

unique (bool, default = None) – Require a check on the creation of the directory to require it to be unique. If True, this will raise if the directory already exists otherwise it does not care. Will defer to the configuration file if None.

Return type:

None

opihiexarata.library.temporary.delete_temporary_directory() None[source]

Delete the temporary directory. If the directory does not exist, this function will do nothing. If the directory exists, but contains files, then this function will fail.

Parameters:

None

Return type:

None

opihiexarata.library.temporary.make_temporary_directory_path(filename: str) str[source]

Creates a full filename path to use. This function basically adds the temporary directory path prefix to place the filename path into it.

Parameters:

filename (string) – The filename of the target to be placed in the temporary directory.

Returns:

full_path – The full path of the file, as it would be stored in the temporary directory.

Return type:

string

opihiexarata.library.temporary.purge_temporary_directory() None[source]

Delete or purge all files in the temporary directory. This does it recursively.

Parameters:

None

Return type:

None