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__(self, \*args, \*\*kwargs)

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

static BuildTemporaryFileName(pattern)

Create a new temporary file.

Parameters
patternstr

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

Returns
fileNamestr

The unique newly created file.

static CreateTemporaryDirectory(directoryPrefix)

Create a new temporary directory.

Parameters
directoryPrefixstr

A subdirectory name.

Returns
tempDirstr

The newly created directory.

static DeleteTemporaryDirectory(directoryName)

Remove a temporary directory.

Parameters
directoryNamestr

The directory to remove.

static FindFileByNameInDirectoryList(name, dirList)

Find a file.

Parameters
namestr

Filename to be found.

dirListsequence of str

The list of directories to search in.

Returns
dirListlist of str

The list of directories searched for config files.

static GetConfigDirectoryList()

Accessor to config directories.

Returns
dirListlist of str

The list of directories searched for config files.

static GetInstallationDirectory()

Accessor to the installation directory.

Returns
installDirstr

The installation prefix.

static GetLibraryDirectory()

Accessor to the library directory.

Returns
dirstr

The directory containing the shared library.

static GetTemporaryDirectory()

Accessor to the temporary directory.

Returns
tempDirstr

The absolute temporary directory.