Interface LoadOptions<Type>

Options for loading a directory tree.

interface LoadOptions<Type> {
    isFile?: IsFile;
    readDir?: ReadDir;
    readFile?: ReadFile<Type>;
}

Type Parameters

  • Type

Properties

isFile?: IsFile

The function to check if a path is a file.

If not provided, isFileByExt is used. This function checks if the last part of the path contains a period.

The path to check.

readDir?: ReadDir

The function to read a directory.

The path to the directory.

readFile?: ReadFile<Type>

The function to read a file.

The type of the file contents.

The path to the file.