Properties
Optional
contains
contains?: ((root: string, file: string) => boolean)
Type declaration
-
- (root: string, file: string): boolean
-
Parameters
-
root: string
-
file: string
Returns boolean
Optional
dirname
dirname?: ((file: string) => string)
Type declaration
-
- (file: string): string
-
Returns string
exists
exists: ((filepath: string) => Promise<boolean>)
Type declaration
-
- (filepath: string): Promise<boolean>
-
Returns Promise<boolean>
existsSync
existsSync: ((filepath: string) => boolean)
Type declaration
-
- (filepath: string): boolean
-
Returns boolean
Optional
fallback
fallback?: ((file: string) => undefined | string)
Type declaration
-
- (file: string): undefined | string
-
Returns undefined | string
readFile
readFile: ((filepath: string) => Promise<string>)
Type declaration
-
- (filepath: string): Promise<string>
-
Returns Promise<string>
readFileSync
readFileSync: ((filepath: string) => string)
Type declaration
-
- (filepath: string): string
-
Returns string
resolve
resolve: ((dir: string, file: string, ext: string) => string)
Type declaration
-
- (dir: string, file: string, ext: string): string
-
Parameters
-
dir: string
-
file: string
-
ext: string
Returns string
Optional
sep
sep?: string
check if file is contained in
root
, always returntrue
by default. Warning: not setting this could expose path traversal vulnerabilities.