MosDirectories

The MosDirectories object provides functions used for working with directories.

Please note that calling any function of the MosDirectories object will immediately put the script module into demo mode if it is not licensed

Methods

Name

Description

exists(directoryPath)

Checks if the directory specified in directoryPath exists. If the directory exists on the disk, returns True, otherwise returns False.

delete(directoryPath)

Removes directory specified in directoryPath.

create(directoryPath)

Creates directory specified in directoryPath.

getDirectories(directoryPath)

Returns a string array containing the names of subdirectories from the directory specified in directoryPath.

getFiles(directoryPath)

Returns a string array containing the names of files from the directory specified in directoryPath.

Examples

The following example shows an expression that checks for the existence of a folder named Windows on the target computer:

var path = 'c:\\windows';
return MosDirectories.exists(path);

Last updated