PathScurryBase | path-scurry (original) (raw)
Class PathScurryBaseAbstract
Hierarchy
- PathScurryBase
Index
Constructors
constructor
- new PathScurryBase(cwd?: string | URL, pathImpl: PlatformPath, sep: string | RegExp, __namedParameters?: PathScurryOpts): PathScurryBase
Internal
Parameters
cwd: string | URL = ...
pathImpl: PlatformPath
sep: string | RegExp
PathScurryOpts = {}
__namedParameters:
Returns PathScurryBase
Properties
Private
#children
Private
#fs
#fs: FSValue
Private
#resolveCache
Private
#resolvePosixCache
cwd
nocase
nocase: boolean
root
rootPath
rootPath: string
roots
roots: {
[k: string]: PathBase;
}
Abstract
sep
sep: string | RegExp
Methods
[asyncIterator]
- [asyncIterator](): AsyncGenerator<PathBase, void, void>
PathBase, void, void>
Returns AsyncGenerator<
[iterator]
basename
Returns string
chdir
Returns void
childrenCache
- childrenCache(): ChildrenCache
Internal
Returns ChildrenCache
depth
Returns number
dirname
Returns string
Abstract
isAbsolute
- isAbsolute(p: string): boolean
Parameters
p: string
Returns boolean
iterate
- iterate(): AsyncGenerator<PathBase, void, void>
PathBase, void, void>
Returns AsyncGenerator<- iterate(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): AsyncGenerator<PathBase, void, void>
PathBase, void, void>
Returns AsyncGenerator<- iterate(opts: WalkOptionsWithFileTypesFalse): AsyncGenerator<string, void, void>
Returns AsyncGenerator<string, void, void>
- iterate(opts: WalkOptions): AsyncGenerator<string | PathBase, void, void>
PathBase, void, void>
Returns AsyncGenerator<string |- iterate(entry: string | PathBase): AsyncGenerator<PathBase, void, void>
PathBase, void, void>
Returns AsyncGenerator<- iterate(entry: string | PathBase, opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): AsyncGenerator<PathBase, void, void>
PathBase, void, void>
Returns AsyncGenerator<- iterate(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): AsyncGenerator<string, void, void>
Returns AsyncGenerator<string, void, void>
- iterate(entry: string | PathBase, opts: WalkOptions): AsyncGenerator<string | PathBase, void, void>
PathBase, void, void>
Returns AsyncGenerator<string |
iterateSync
- iterateSync(): Generator<PathBase, void, void>
PathBase, void, void>
Returns Generator<- iterateSync(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Generator<PathBase, void, void>
PathBase, void, void>
Returns Generator<- iterateSync(opts: WalkOptionsWithFileTypesFalse): Generator<string, void, void>
Returns Generator<string, void, void>
- iterateSync(opts: WalkOptions): Generator<string | PathBase, void, void>
PathBase, void, void>
Returns Generator<string |- iterateSync(entry: string | PathBase): Generator<PathBase, void, void>
PathBase, void, void>
Returns Generator<- iterateSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Generator<PathBase, void, void>
PathBase, void, void>
Returns Generator<- iterateSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): Generator<string, void, void>
Returns Generator<string, void, void>
- iterateSync(entry: string | PathBase, opts: WalkOptions): Generator<string | PathBase, void, void>
PathBase, void, void>
Returns Generator<string |
lstat
- lstat(entry?: string | PathBase): Promise<undefined | PathBase>
Parameters
PathBase = ...
entry: string |
Returns Promise<undefined | PathBase>
lstatSync
- lstatSync(entry?: string | PathBase): undefined | PathBase
Parameters
PathBase = ...
entry: string |
Returns undefined | PathBase
Abstract
newRoot
- newRoot(fs: FSValue): PathBase
Internal
Parameters
fs: FSValue
Returns PathBase
Abstract
parseRootPath
- parseRootPath(dir: string): string
Internal
Parameters
dir: string
Returns string
readdir
- readdir(): Promise<PathBase[]>
PathBase[]>
Returns Promise<- readdir(opts: {
withFileTypes: true;
}): Promise<PathBase[]> Parameters
opts: {
withFileTypes: true;
}
* ##### withFileTypes: true
Returns Promise<PathBase[]>
- readdir(opts: {
withFileTypes: false;
}): Promise<string[]> Parameters
opts: {
withFileTypes: false;
}
* ##### withFileTypes: false
Returns Promise<string[]>
- readdir(opts: {
withFileTypes: boolean;
}): Promise<string[] | PathBase[]> Parameters
opts: {
withFileTypes: boolean;
}
* ##### withFileTypes: boolean
Returns Promise<string[] | PathBase[]>
- readdir(entry: string | PathBase): Promise<PathBase[]>
PathBase[]>
Returns Promise<- readdir(entry: string | PathBase, opts: {
withFileTypes: true;
}): Promise<PathBase[]> Parameters
PathBase
entry: string |opts: {
withFileTypes: true;
}
* ##### withFileTypes: true
Returns Promise<PathBase[]>
- readdir(entry: string | PathBase, opts: {
withFileTypes: false;
}): Promise<string[]> Parameters
PathBase
entry: string |opts: {
withFileTypes: false;
}
* ##### withFileTypes: false
Returns Promise<string[]>
- readdir(entry: string | PathBase, opts: {
withFileTypes: boolean;
}): Promise<string[] | PathBase[]> Parameters
PathBase
entry: string |opts: {
withFileTypes: boolean;
}
* ##### withFileTypes: boolean
Returns Promise<string[] | PathBase[]>
readdirSync
- readdirSync(): PathBase[]
PathBase[]
Returns- readdirSync(opts: {
withFileTypes: true;
}): PathBase[] Parameters
opts: {
withFileTypes: true;
}
* ##### withFileTypes: true
Returns PathBase[]
- readdirSync(opts: {
withFileTypes: false;
}): string[] Parameters
opts: {
withFileTypes: false;
}
* ##### withFileTypes: false
Returns string[]
- readdirSync(opts: {
withFileTypes: boolean;
}): string[] | PathBase[] Parameters
opts: {
withFileTypes: boolean;
}
* ##### withFileTypes: boolean
Returns string[] | PathBase[]
- readdirSync(entry: string | PathBase): PathBase[]
PathBase[]
Returns- readdirSync(entry: string | PathBase, opts: {
withFileTypes: true;
}): PathBase[] Parameters
PathBase
entry: string |opts: {
withFileTypes: true;
}
* ##### withFileTypes: true
Returns PathBase[]
- readdirSync(entry: string | PathBase, opts: {
withFileTypes: false;
}): string[] Parameters
PathBase
entry: string |opts: {
withFileTypes: false;
}
* ##### withFileTypes: false
Returns string[]
- readdirSync(entry: string | PathBase, opts: {
withFileTypes: boolean;
}): string[] | PathBase[] Parameters
PathBase
entry: string |opts: {
withFileTypes: boolean;
}
* ##### withFileTypes: boolean
Returns string[] | PathBase[]
readlink
- readlink(): Promise<undefined | string>
Returns Promise<undefined | string>
- readlink(opt: {
withFileTypes: false;
}): Promise<undefined | string> Parameters
opt: {
withFileTypes: false;
}
* ##### withFileTypes: false
Returns Promise<undefined | string>
- readlink(opt: {
withFileTypes: true;
}): Promise<undefined | PathBase> Parameters
opt: {
withFileTypes: true;
}
* ##### withFileTypes: true
Returns Promise<undefined | PathBase>
- readlink(opt: {
withFileTypes: boolean;
}): Promise<undefined | string | PathBase> Parameters
opt: {
withFileTypes: boolean;
}
* ##### withFileTypes: boolean
Returns Promise<undefined | string | PathBase>
- readlink(entry: string | PathBase, opt?: {
withFileTypes: false;
}): Promise<undefined | string> Parameters
PathBase
entry: string |Optional
opt: {
withFileTypes: false;
}
* ##### withFileTypes: false
Returns Promise<undefined | string>
- readlink(entry: string | PathBase, opt: {
withFileTypes: true;
}): Promise<undefined | PathBase> Parameters
PathBase
entry: string |opt: {
withFileTypes: true;
}
* ##### withFileTypes: true
Returns Promise<undefined | PathBase>
- readlink(entry: string | PathBase, opt: {
withFileTypes: boolean;
}): Promise<undefined | string | PathBase> Parameters
PathBase
entry: string |opt: {
withFileTypes: boolean;
}
* ##### withFileTypes: boolean
Returns Promise<undefined | string | PathBase>
readlinkSync
- readlinkSync(): undefined | string
Returns undefined | string
- readlinkSync(opt: {
withFileTypes: false;
}): undefined | string Parameters
opt: {
withFileTypes: false;
}
* ##### withFileTypes: false
Returns undefined | string
- readlinkSync(opt: {
withFileTypes: true;
}): undefined | PathBase Parameters
opt: {
withFileTypes: true;
}
* ##### withFileTypes: true
Returns undefined | PathBase
- readlinkSync(opt: {
withFileTypes: boolean;
}): undefined | string | PathBase Parameters
opt: {
withFileTypes: boolean;
}
* ##### withFileTypes: boolean
Returns undefined | string | PathBase
- readlinkSync(entry: string | PathBase, opt?: {
withFileTypes: false;
}): undefined | string Parameters
PathBase
entry: string |Optional
opt: {
withFileTypes: false;
}
* ##### withFileTypes: false
Returns undefined | string
- readlinkSync(entry: string | PathBase, opt: {
withFileTypes: true;
}): undefined | PathBase Parameters
PathBase
entry: string |opt: {
withFileTypes: true;
}
* ##### withFileTypes: true
Returns undefined | PathBase
- readlinkSync(entry: string | PathBase, opt: {
withFileTypes: boolean;
}): undefined | string | PathBase Parameters
PathBase
entry: string |opt: {
withFileTypes: boolean;
}
* ##### withFileTypes: boolean
Returns undefined | string | PathBase
realpath
- realpath(): Promise<undefined | string>
Returns Promise<undefined | string>
- realpath(opt: {
withFileTypes: false;
}): Promise<undefined | string> Parameters
opt: {
withFileTypes: false;
}
* ##### withFileTypes: false
Returns Promise<undefined | string>
- realpath(opt: {
withFileTypes: true;
}): Promise<undefined | PathBase> Parameters
opt: {
withFileTypes: true;
}
* ##### withFileTypes: true
Returns Promise<undefined | PathBase>
- realpath(opt: {
withFileTypes: boolean;
}): Promise<undefined | string | PathBase> Parameters
opt: {
withFileTypes: boolean;
}
* ##### withFileTypes: boolean
Returns Promise<undefined | string | PathBase>
- realpath(entry: string | PathBase, opt?: {
withFileTypes: false;
}): Promise<undefined | string> Parameters
PathBase
entry: string |Optional
opt: {
withFileTypes: false;
}
* ##### withFileTypes: false
Returns Promise<undefined | string>
- realpath(entry: string | PathBase, opt: {
withFileTypes: true;
}): Promise<undefined | PathBase> Parameters
PathBase
entry: string |opt: {
withFileTypes: true;
}
* ##### withFileTypes: true
Returns Promise<undefined | PathBase>
- realpath(entry: string | PathBase, opt: {
withFileTypes: boolean;
}): Promise<undefined | string | PathBase> Parameters
PathBase
entry: string |opt: {
withFileTypes: boolean;
}
* ##### withFileTypes: boolean
Returns Promise<undefined | string | PathBase>
realpathSync
- realpathSync(): undefined | string
Returns undefined | string
- realpathSync(opt: {
withFileTypes: false;
}): undefined | string Parameters
opt: {
withFileTypes: false;
}
* ##### withFileTypes: false
Returns undefined | string
- realpathSync(opt: {
withFileTypes: true;
}): undefined | PathBase Parameters
opt: {
withFileTypes: true;
}
* ##### withFileTypes: true
Returns undefined | PathBase
- realpathSync(opt: {
withFileTypes: boolean;
}): undefined | string | PathBase Parameters
opt: {
withFileTypes: boolean;
}
* ##### withFileTypes: boolean
Returns undefined | string | PathBase
- realpathSync(entry: string | PathBase, opt?: {
withFileTypes: false;
}): undefined | string Parameters
PathBase
entry: string |Optional
opt: {
withFileTypes: false;
}
* ##### withFileTypes: false
Returns undefined | string
- realpathSync(entry: string | PathBase, opt: {
withFileTypes: true;
}): undefined | PathBase Parameters
PathBase
entry: string |opt: {
withFileTypes: true;
}
* ##### withFileTypes: true
Returns undefined | PathBase
- realpathSync(entry: string | PathBase, opt: {
withFileTypes: boolean;
}): undefined | string | PathBase Parameters
PathBase
entry: string |opt: {
withFileTypes: boolean;
}
* ##### withFileTypes: boolean
Returns undefined | string | PathBase
relative
Returns string
relativePosix
Returns string
resolve
- resolve(...paths: string[]): string
Parameters
Rest
...paths: string[]
Returns string
resolvePosix
- resolvePosix(...paths: string[]): string
Parameters
Rest
...paths: string[]
Returns string
stream
- stream(): Minipass<PathBase, PathBase, Events<PathBase>>
PathBase, PathBase, Events<PathBase>>
Returns Minipass<- stream(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Minipass<PathBase, PathBase, Events<PathBase>>
PathBase, PathBase, Events<PathBase>>
Returns Minipass<- stream(opts: WalkOptionsWithFileTypesFalse): Minipass<string, ContiguousData, Events<string>>
Returns Minipass<string, ContiguousData, Events<string>>
- stream(opts: WalkOptions): Minipass<string | PathBase, ContiguousData | PathBase, Events<string | PathBase>>
PathBase, ContiguousData | PathBase, Events<string | PathBase>>
Returns Minipass<string |- stream(entry: string | PathBase): Minipass<PathBase, PathBase, Events<PathBase>>
PathBase, PathBase, Events<PathBase>>
Returns Minipass<- stream(entry: string | PathBase, opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Minipass<PathBase, PathBase, Events<PathBase>>
PathBase, PathBase, Events<PathBase>>
Returns Minipass<- stream(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): Minipass<string, ContiguousData, Events<string>>
Returns Minipass<string, ContiguousData, Events<string>>
- stream(entry: string | PathBase, opts: WalkOptions): Minipass<string, ContiguousData, Events<string>> | Minipass<PathBase, PathBase, Events<PathBase>>
PathBase, PathBase, Events<PathBase>>
Returns Minipass<string, ContiguousData, Events<string>> | Minipass<
streamSync
- streamSync(): Minipass<PathBase, PathBase, Events<PathBase>>
PathBase, PathBase, Events<PathBase>>
Returns Minipass<- streamSync(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Minipass<PathBase, PathBase, Events<PathBase>>
PathBase, PathBase, Events<PathBase>>
Returns Minipass<- streamSync(opts: WalkOptionsWithFileTypesFalse): Minipass<string, ContiguousData, Events<string>>
Returns Minipass<string, ContiguousData, Events<string>>
- streamSync(opts: WalkOptions): Minipass<string | PathBase, ContiguousData | PathBase, Events<string | PathBase>>
PathBase, ContiguousData | PathBase, Events<string | PathBase>>
Returns Minipass<string |- streamSync(entry: string | PathBase): Minipass<PathBase, PathBase, Events<PathBase>>
PathBase, PathBase, Events<PathBase>>
Returns Minipass<- streamSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Minipass<PathBase, PathBase, Events<PathBase>>
PathBase, PathBase, Events<PathBase>>
Returns Minipass<- streamSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): Minipass<string, ContiguousData, Events<string>>
Returns Minipass<string, ContiguousData, Events<string>>
- streamSync(entry: string | PathBase, opts: WalkOptions): Minipass<string, ContiguousData, Events<string>> | Minipass<PathBase, PathBase, Events<PathBase>>
PathBase, PathBase, Events<PathBase>>
Returns Minipass<string, ContiguousData, Events<string>> | Minipass<
walk
- walk(): Promise<PathBase[]>
PathBase[]>
Returns Promise<- walk(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Promise<PathBase[]>
PathBase[]>
Returns Promise<- walk(opts: WalkOptionsWithFileTypesFalse): Promise<string[]>
Returns Promise<string[]>
- walk(opts: WalkOptions): Promise<string[] | PathBase[]>
PathBase[]>
Returns Promise<string[] |- walk(entry: string | PathBase): Promise<PathBase[]>
PathBase[]>
Returns Promise<- walk(entry: string | PathBase, opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Promise<PathBase[]>
PathBase[]>
Returns Promise<- walk(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): Promise<string[]>
Returns Promise<string[]>
- walk(entry: string | PathBase, opts: WalkOptions): Promise<string[] | PathBase[]>
PathBase[]>
Returns Promise<string[] |
walkSync
- walkSync(): PathBase[]
PathBase[]
Returns- walkSync(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): PathBase[]
PathBase[]
Returns- walkSync(opts: WalkOptionsWithFileTypesFalse): string[]
Returns string[]
- walkSync(opts: WalkOptions): string[] | PathBase[]
PathBase[]
Returns string[] |- walkSync(entry: string | PathBase): PathBase[]
PathBase[]
Returns- walkSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): PathBase[]
PathBase[]
Returns- walkSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): string[]
Returns string[]
- walkSync(entry: string | PathBase, opts: WalkOptions): string[] | PathBase[]
PathBase[]
Returns string[] |