Configuration options for filesystem operations.

  • options for creating an options object with default values
  • FsOptionsDefault for the default values
interface FsOptions {
    excludedFileSystemTypes: string[];
    excludedMountPointGlobs: string[];
    linuxMountTablePath: string;
    onlyDirectories: boolean;
    timeoutMs: number;
}

Properties

excludedFileSystemTypes: string[]

File system types to exclude when listing mount points. Only applied on Linux and macOS systems.

Default values exclude "proc", "cgroup", and other non-physical filesystems.

excludedMountPointGlobs: string[]

Glob patterns to exclude when listing mount points.

POSIX forward-slashed pathnames will work on all platforms.

Default values exclude common system directories.

linuxMountTablePath: string

On Linux, what mount point table should we look at? This defaults to /proc/mounts, but /etc/mtab is also common.

onlyDirectories: boolean

Should only readable directories be included?

timeoutMs: number

Timeout in milliseconds for filesystem operations. Disable timeouts by setting this to 0.

Default is 5000ms (5 seconds) on macOS and Linux, and 15000ms (15 seconds) on Windows.