Interface representing a directory in a file system. Provides methods and properties to interact with the files and subdirectories.

interface FileDirectory {
    BasePath: string;
    CanCreateSiblingFiles: boolean;
    Id: number;
    ListDirectories: ((pattern?: string) => FileDirectory[]);
    ListFiles: ((pattern?: string) => FileInstance[]);
    Name: string;
}

Properties

BasePath: string

The full path to the directory in the file system.

CanCreateSiblingFiles: boolean

Indicates whether sibling files can be created within this directory.

Id: number

The unique identifier for the directory.

ListDirectories: ((pattern?: string) => FileDirectory[])

Lists subdirectories in the directory that match the provided pattern.

Type declaration

    • (pattern?): FileDirectory[]
    • Parameters

      • Optionalpattern: string

        Optional. A search pattern to match directory names against (e.g., "sub*"). If no pattern is provided, all subdirectories in the directory will be listed.

      Returns FileDirectory[]

      An array of IFileDirectory objects representing the matching subdirectories.

ListFiles: ((pattern?: string) => FileInstance[])

Lists files in the directory that match the provided pattern.

Type declaration

    • (pattern?): FileInstance[]
    • Parameters

      • Optionalpattern: string

        Optional. A search pattern to match file names against (e.g., "*.txt"). If no pattern is provided, all files in the directory will be listed.

      Returns FileInstance[]

      An array of IFileInstance objects representing the matching files.

Name: string

The name of the directory.