Path

class Path(*args, **kwargs)

Path utilities.

No constructor, only static methods are available.

Methods

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

x.__init__(…) initializes x; see help(type(x)) for signature

static BuildTemporaryFileName()

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()

Create a new temporary directory.

Parameters:

directoryPrefix : str

A subdirectory name.

Returns:

tempDir : str

The newly created directory.

static DeleteTemporaryDirectory()

Remove a temporary directory.

Parameters:

directoryName : str

The directory to remove.

static FindFileByNameInDirectoryList(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 GetTemporaryDirectory()

Accessor to the temporary directory.

Returns:

tempDir : str

The absolute temporary directory.