Path

class Path(*args, **kwargs)

Path utilities.

No constructor, only static methods are available.

Methods

BuildTemporaryFileName(pattern) Create a new temporary file.
CreateTemporaryDirectory(directoryPrefix) Create a new temporary directory.
DeleteTemporaryDirectory(directoryName) Remove a temporary directory.
FindFileByNameInDirectoryList(name, dirList) Find a file.
GetConfigDirectoryList() Accessor to config directories.
GetInstallationDirectory() Accessor to the installation directory.
GetLibraryDirectory() Accessor to the library directory.
GetTemporaryDirectory() Accessor to the temporary directory.
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

static BuildTemporaryFileName(pattern)

Create a new temporary file.

Parameters:
pattern : str

Filename pattern, eg ‘tmpXXXXXX’. The ‘XXXXXXX’ part will be replaced by random chars.

Returns:
fileName : str

The unique newly created file.

static CreateTemporaryDirectory(directoryPrefix)

Create a new temporary directory.

Parameters:
directoryPrefix : str

A subdirectory name.

Returns:
tempDir : str

The newly created directory.

static DeleteTemporaryDirectory(directoryName)

Remove a temporary directory.

Parameters:
directoryName : str

The directory to remove.

static FindFileByNameInDirectoryList(name, dirList)

Find a file.

Parameters:
name : str

Filename to be found.

dirList : sequence of str

The list of directories to search in.

Returns:
dirList : list of str

The list of directories searched for config files.

static GetConfigDirectoryList()

Accessor to config directories.

Returns:
dirList : list of str

The list of directories searched for config files.

static GetInstallationDirectory()

Accessor to the installation directory.

Returns:
installDir : str

The installation prefix.

static GetLibraryDirectory()

Accessor to the library directory.

Returns:
dir : str

The directory containing the shared library.

static GetTemporaryDirectory()

Accessor to the temporary directory.

Returns:
tempDir : str

The absolute temporary directory.