path-scurry
    Preparing search index...

    Class PathScurryWin32

    Windows implementation of PathScurryBase

    Defaults to case insensitve, uses '\\' to generate path strings. Uses PathWin32 for Path objects.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    The Path entry corresponding to this PathScurry's current working directory.

    nocase: boolean

    Perform path comparisons case-insensitively.

    Defaults true on Darwin and Windows systems, false elsewhere.

    root: PathBase

    The root Path entry for the current working directory of this Scurry

    rootPath: string

    The string path for the root of this Scurry's current working directory

    roots: { [k: string]: PathBase }

    A collection of all roots encountered, referenced by rootPath

    sep: "\\" = '\\'

    separator for generating path strings

    Methods

    • Call lstat() on the string or Path object, and update all known information that can be determined.

      Note that unlike fs.lstat(), the returned value does not contain some information, such as mode, dev, nlink, and ino. If that information is required, you will need to call fs.lstat yourself.

      If the Path refers to a nonexistent file, or if the lstat call fails for any reason, undefined is returned. Otherwise the updated Path object is returned.

      Results are cached, and thus may be out of date if the filesystem is mutated.

      Parameters

      Returns Promise<PathBase | undefined>

    • Return an array of known child entries.

      First argument may be either a string, or a Path object.

      If the Path cannot or does not contain any children, then an empty array is returned.

      Results are cached, and thus may be out of date if the filesystem is mutated.

      Unlike fs.readdir(), the withFileTypes option defaults to true. Set { withFileTypes: false } to return strings.

      Returns Promise<PathBase[]>

    • Return an array of known child entries.

      First argument may be either a string, or a Path object.

      If the Path cannot or does not contain any children, then an empty array is returned.

      Results are cached, and thus may be out of date if the filesystem is mutated.

      Unlike fs.readdir(), the withFileTypes option defaults to true. Set { withFileTypes: false } to return strings.

      Parameters

      • opts: { withFileTypes: true }

      Returns Promise<PathBase[]>

    • Return an array of known child entries.

      First argument may be either a string, or a Path object.

      If the Path cannot or does not contain any children, then an empty array is returned.

      Results are cached, and thus may be out of date if the filesystem is mutated.

      Unlike fs.readdir(), the withFileTypes option defaults to true. Set { withFileTypes: false } to return strings.

      Parameters

      • opts: { withFileTypes: false }

      Returns Promise<string[]>

    • Return an array of known child entries.

      First argument may be either a string, or a Path object.

      If the Path cannot or does not contain any children, then an empty array is returned.

      Results are cached, and thus may be out of date if the filesystem is mutated.

      Unlike fs.readdir(), the withFileTypes option defaults to true. Set { withFileTypes: false } to return strings.

      Parameters

      • opts: { withFileTypes: boolean }

      Returns Promise<PathBase[] | string[]>

    • Return an array of known child entries.

      First argument may be either a string, or a Path object.

      If the Path cannot or does not contain any children, then an empty array is returned.

      Results are cached, and thus may be out of date if the filesystem is mutated.

      Unlike fs.readdir(), the withFileTypes option defaults to true. Set { withFileTypes: false } to return strings.

      Parameters

      Returns Promise<PathBase[]>

    • Return an array of known child entries.

      First argument may be either a string, or a Path object.

      If the Path cannot or does not contain any children, then an empty array is returned.

      Results are cached, and thus may be out of date if the filesystem is mutated.

      Unlike fs.readdir(), the withFileTypes option defaults to true. Set { withFileTypes: false } to return strings.

      Parameters

      • entry: string | PathBase
      • opts: { withFileTypes: true }

      Returns Promise<PathBase[]>

    • Return an array of known child entries.

      First argument may be either a string, or a Path object.

      If the Path cannot or does not contain any children, then an empty array is returned.

      Results are cached, and thus may be out of date if the filesystem is mutated.

      Unlike fs.readdir(), the withFileTypes option defaults to true. Set { withFileTypes: false } to return strings.

      Parameters

      • entry: string | PathBase
      • opts: { withFileTypes: false }

      Returns Promise<string[]>

    • Return an array of known child entries.

      First argument may be either a string, or a Path object.

      If the Path cannot or does not contain any children, then an empty array is returned.

      Results are cached, and thus may be out of date if the filesystem is mutated.

      Unlike fs.readdir(), the withFileTypes option defaults to true. Set { withFileTypes: false } to return strings.

      Parameters

      • entry: string | PathBase
      • opts: { withFileTypes: boolean }

      Returns Promise<PathBase[] | string[]>

    • Return the Path object or string path corresponding to the target of a symbolic link.

      If the path is not a symbolic link, or if the readlink call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Returns Promise<string | undefined>

    • Return the Path object or string path corresponding to the target of a symbolic link.

      If the path is not a symbolic link, or if the readlink call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Parameters

      • opt: { withFileTypes: false }

      Returns Promise<string | undefined>

    • Return the Path object or string path corresponding to the target of a symbolic link.

      If the path is not a symbolic link, or if the readlink call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Parameters

      • opt: { withFileTypes: true }

      Returns Promise<PathBase | undefined>

    • Return the Path object or string path corresponding to the target of a symbolic link.

      If the path is not a symbolic link, or if the readlink call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Parameters

      • opt: { withFileTypes: boolean }

      Returns Promise<string | PathBase | undefined>

    • Return the Path object or string path corresponding to the target of a symbolic link.

      If the path is not a symbolic link, or if the readlink call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Parameters

      • entry: string | PathBase
      • Optionalopt: { withFileTypes: false }

      Returns Promise<string | undefined>

    • Return the Path object or string path corresponding to the target of a symbolic link.

      If the path is not a symbolic link, or if the readlink call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Parameters

      • entry: string | PathBase
      • opt: { withFileTypes: true }

      Returns Promise<PathBase | undefined>

    • Return the Path object or string path corresponding to the target of a symbolic link.

      If the path is not a symbolic link, or if the readlink call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Parameters

      • entry: string | PathBase
      • opt: { withFileTypes: boolean }

      Returns Promise<string | PathBase | undefined>

    • Return the Path object or string path corresponding to path as resolved by realpath(3).

      If the realpath call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Returns Promise<string | undefined>

    • Return the Path object or string path corresponding to path as resolved by realpath(3).

      If the realpath call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Parameters

      • opt: { withFileTypes: false }

      Returns Promise<string | undefined>

    • Return the Path object or string path corresponding to path as resolved by realpath(3).

      If the realpath call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Parameters

      • opt: { withFileTypes: true }

      Returns Promise<PathBase | undefined>

    • Return the Path object or string path corresponding to path as resolved by realpath(3).

      If the realpath call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Parameters

      • opt: { withFileTypes: boolean }

      Returns Promise<string | PathBase | undefined>

    • Return the Path object or string path corresponding to path as resolved by realpath(3).

      If the realpath call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Parameters

      • entry: string | PathBase
      • Optionalopt: { withFileTypes: false }

      Returns Promise<string | undefined>

    • Return the Path object or string path corresponding to path as resolved by realpath(3).

      If the realpath call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Parameters

      • entry: string | PathBase
      • opt: { withFileTypes: true }

      Returns Promise<PathBase | undefined>

    • Return the Path object or string path corresponding to path as resolved by realpath(3).

      If the realpath call fails for any reason, undefined is returned.

      Result is cached, and thus may be outdated if the filesystem is mutated.

      {withFileTypes} option defaults to false.

      On success, returns a Path object if withFileTypes option is true, otherwise a string.

      Parameters

      • entry: string | PathBase
      • opt: { withFileTypes: boolean }

      Returns Promise<string | PathBase | undefined>

    • Resolve one or more path strings to a resolved string

      Same interface as require('path').resolve.

      Much faster than path.resolve() when called multiple times for the same path, because the resolved Path objects are cached. Much slower otherwise.

      Parameters

      • ...paths: string[]

      Returns string

    • Resolve one or more path strings to a resolved string, returning the posix path. Identical to .resolve() on posix systems, but on windows will return a forward-slash separated UNC path.

      Same interface as require('path').resolve.

      Much faster than path.resolve() when called multiple times for the same path, because the resolved Path objects are cached. Much slower otherwise.

      Parameters

      • ...paths: string[]

      Returns string