@oazmi/kitchensink - v0.9.13
    Preparing search index...

    Interface RemoveEntryConfig

    optional configuration options for deleting a filesystem entry (file, folder or symlink), used by the removeEntry function.

    by explicitly specifying one of isFile, isDirectory, or isSymlink fields to be either true or false, you can control which _type_s of filesystem-entries to delete, and which _type_s to ignore. the type of the entry is first identified via statEntry (which also tells us if it already exists or not).

    so, for instance:

    • if config.isFile is set to true, but the path corresponds to either a symlink or a folder, then they will not be deleted.
    • if config.isFile is set to false, but the path corresponds to a file, then the file will not be deleted.
    • if config.isFile is set to true, and the path corresponds to a file, then the file will be deleted.
    • if config.isFile is set to false, and the path corresponds to either a symlink or a folder, then that entry will be deleted.
    interface RemoveEntryConfig {
        isFile: boolean;
        isDirectory: boolean;
        isSymlink: boolean;
        recursive: boolean;
    }

    Hierarchy

    • Pick<FsEntryInfo, "isDirectory" | "isFile" | "isSymlink">
      • RemoveEntryConfig
    Index

    Properties

    isFile: boolean

    this field is true if this info corresponds to a regular file.

    mutually exclusive with respect to isDirectory and isSymlink.

    isDirectory: boolean

    this field is true if this info corresponds to a regular folder.

    mutually exclusive with respect to isFile and isSymlink.

    isSymlink: boolean

    this field is true if this info corresponds to a symbolic-link (symlink).

    mutually exclusive with respect to isFile and isDirectory.

    recursive: boolean

    specify if a non-empty directory can be deleted recursively. without this option enabled, removing a non-empty folder will throw an error.

    false (removing non-empty directories will not work and throw an error)