Search
Preparing search index...
The search index is not available
Yarn API
Home
Configuration
Features
CLI
Advanced
GitHub
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
yarnpkg-fslib
NoFS
Globals
{"Generic Packages":{"@yarnpkg/core":"yarnpkg_core","@yarnpkg/fslib":"yarnpkg_fslib","@yarnpkg/libzip":"yarnpkg_libzip","@yarnpkg/nm":"yarnpkg_nm","@yarnpkg/parsers":"yarnpkg_parsers","@yarnpkg/pnp":"yarnpkg_pnp","@yarnpkg/pnpify":"yarnpkg_pnpify","@yarnpkg/sdks":"yarnpkg_sdks","@yarnpkg/shell":"yarnpkg_shell"},"Yarn Packages":{"@yarnpkg/builder":"yarnpkg_builder","@yarnpkg/cli":"yarnpkg_cli"},"Default Plugins":{"@yarnpkg/plugin-compat":"plugin_compat","@yarnpkg/plugin-dlx":"plugin_dlx","@yarnpkg/plugin-essentials":"plugin_essentials","@yarnpkg/plugin-file":"plugin_file","@yarnpkg/plugin-git":"plugin_git","@yarnpkg/plugin-github":"plugin_github","@yarnpkg/plugin-http":"plugin_http","@yarnpkg/plugin-init":"plugin_init","@yarnpkg/plugin-link":"plugin_link","@yarnpkg/plugin-nm":"plugin_nm","@yarnpkg/plugin-npm":"plugin_npm","@yarnpkg/plugin-npm-cli":"plugin_npm_cli","@yarnpkg/plugin-pack":"plugin_pack","@yarnpkg/plugin-patch":"plugin_patch","@yarnpkg/plugin-pnp":"plugin_pnp"},"Contrib Plugins":{"@yarnpkg/plugin-constraints":"plugin_constraints","@yarnpkg/plugin-exec":"plugin_exec","@yarnpkg/plugin-interactive-tools":"plugin_interactive_tools","@yarnpkg/plugin-stage":"plugin_stage","@yarnpkg/plugin-typescript":"plugin_typescript","@yarnpkg/plugin-version":"plugin_version","@yarnpkg/plugin-workspace-tools":"plugin_workspace_tools"}}
Class NoFS
Hierarchy
FakeFS
<
PortablePath
>
NoFS
Constructors
constructor
Properties
pathUtils
instance
Methods
accessPromise
accessSync
appendFilePromise
appendFileSync
changeFilePromise
changeFileSync
chmodPromise
chmodSync
chownPromise
chownSync
closePromise
closeSync
copyFilePromise
copyFileSync
copyPromise
copySync
createReadStream
createWriteStream
existsPromise
existsSync
fchmodPromise
fchmodSync
fchownPromise
fchownSync
fstatPromise
fstatSync
ftruncatePromise
ftruncateSync
genTraversePromise
getExtractHint
getRealPath
linkPromise
linkSync
lockPromise
lstatPromise
lstatSync
lutimesPromise
lutimesSync
mkdirPromise
mkdirSync
mkdirpPromise
mkdirpSync
movePromise
moveSync
openPromise
openSync
opendirPromise
opendirSync
preserveTimePromise
preserveTimeSync
readFilePromise
readFileSync
readJsonPromise
readJsonSync
readPromise
readSync
readdirPromise
readdirSync
readlinkPromise
readlinkSync
realpathPromise
realpathSync
removePromise
removeSync
renamePromise
renameSync
resolve
rmdirPromise
rmdirSync
statPromise
statSync
symlinkPromise
symlinkSync
truncatePromise
truncateSync
unlinkPromise
unlinkSync
unwatchFile
utimesPromise
utimesSync
watch
watchFile
writeFilePromise
writeFileSync
writeJsonPromise
writeJsonSync
writePromise
writeSync
Constructors
constructor
new
NoFS
(
)
:
NoFS
Returns
NoFS
Properties
path
Utils
path
Utils
:
PathUtils
<
PortablePath
>
Static
instance
instance
:
NoFS
= new NoFS()
Methods
access
Promise
access
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
access
Sync
access
Sync
(
)
:
never
Returns
never
append
File
Promise
append
File
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
append
File
Sync
append
File
Sync
(
)
:
never
Returns
never
change
File
Promise
change
File
Promise
(
p
:
PortablePath
, content
:
Buffer
)
:
Promise
<
void
>
change
File
Promise
(
p
:
PortablePath
, content
:
string
, opts
?:
ChangeFileOptions
)
:
Promise
<
void
>
Parameters
p:
PortablePath
content:
Buffer
Returns
Promise
<
void
>
Parameters
p:
PortablePath
content:
string
Optional
opts:
ChangeFileOptions
Returns
Promise
<
void
>
change
File
Sync
change
File
Sync
(
p
:
PortablePath
, content
:
Buffer
)
:
void
change
File
Sync
(
p
:
PortablePath
, content
:
string
, opts
?:
ChangeFileOptions
)
:
void
Parameters
p:
PortablePath
content:
Buffer
Returns
void
Parameters
p:
PortablePath
content:
string
Optional
opts:
ChangeFileOptions
Returns
void
chmod
Promise
chmod
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
chmod
Sync
chmod
Sync
(
)
:
never
Returns
never
chown
Promise
chown
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
chown
Sync
chown
Sync
(
)
:
never
Returns
never
close
Promise
close
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
close
Sync
close
Sync
(
)
:
never
Returns
never
copy
File
Promise
copy
File
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
copy
File
Sync
copy
File
Sync
(
)
:
never
Returns
never
copy
Promise
copy
Promise
(
destination
:
PortablePath
, source
:
PortablePath
, options
?:
undefined
|
object
)
:
Promise
<
void
>
copy
Promise<P2>
(
destination
:
PortablePath
, source
:
P2
, options
:
object
)
:
Promise
<
void
>
Parameters
destination:
PortablePath
source:
PortablePath
Optional
options:
undefined
|
object
Returns
Promise
<
void
>
Type parameters
P2
:
Path
Parameters
destination:
PortablePath
source:
P2
options:
object
base
Fs
:
FakeFS
<
P2
>
Optional
link
Strategy
?:
LinkStrategy
Optional
overwrite
?:
undefined
|
false
|
true
Optional
stable
Sort
?:
undefined
|
false
|
true
Optional
stable
Time
?:
undefined
|
false
|
true
Returns
Promise
<
void
>
copy
Sync
copy
Sync
(
destination
:
PortablePath
, source
:
PortablePath
, options
?:
undefined
|
object
)
:
void
copy
Sync<P2>
(
destination
:
PortablePath
, source
:
P2
, options
:
object
)
:
void
deprecated
Prefer using
copyPromise
instead
Parameters
destination:
PortablePath
source:
PortablePath
Optional
options:
undefined
|
object
Returns
void
Type parameters
P2
:
Path
Parameters
destination:
PortablePath
source:
P2
options:
object
base
Fs
:
FakeFS
<
P2
>
Optional
overwrite
?:
undefined
|
false
|
true
Returns
void
create
Read
Stream
create
Read
Stream
(
)
:
never
Returns
never
create
Write
Stream
create
Write
Stream
(
)
:
never
Returns
never
exists
Promise
exists
Promise
(
p
:
PortablePath
)
:
Promise
<
never
>
Parameters
p:
PortablePath
Returns
Promise
<
never
>
exists
Sync
exists
Sync
(
p
:
PortablePath
)
:
never
Parameters
p:
PortablePath
Returns
never
fchmod
Promise
fchmod
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
fchmod
Sync
fchmod
Sync
(
)
:
never
Returns
never
fchown
Promise
fchown
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
fchown
Sync
fchown
Sync
(
)
:
never
Returns
never
fstat
Promise
fstat
Promise
(
fd
:
number
)
:
Promise
<
never
>
Parameters
fd:
number
Returns
Promise
<
never
>
fstat
Sync
fstat
Sync
(
fd
:
number
)
:
never
Parameters
fd:
number
Returns
never
ftruncate
Promise
ftruncate
Promise
(
fd
:
number
, len
?:
undefined
|
number
)
:
Promise
<
never
>
Parameters
fd:
number
Optional
len:
undefined
|
number
Returns
Promise
<
never
>
ftruncate
Sync
ftruncate
Sync
(
fd
:
number
, len
?:
undefined
|
number
)
:
never
Parameters
fd:
number
Optional
len:
undefined
|
number
Returns
never
gen
Traverse
Promise
gen
Traverse
Promise
(
init
:
PortablePath
, __namedParameters
?:
object
)
:
AsyncGenerator
<
P
,
void
,
unknown
>
Parameters
init:
PortablePath
Default value
__namedParameters:
object
= {}
stable
Sort
:
boolean
Returns
AsyncGenerator
<
P
,
void
,
unknown
>
get
Extract
Hint
get
Extract
Hint
(
)
:
never
Returns
never
get
Real
Path
get
Real
Path
(
)
:
never
Returns
never
link
Promise
link
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
link
Sync
link
Sync
(
)
:
never
Returns
never
lock
Promise
lock
Promise<T>
(
affectedPath
:
PortablePath
, callback
:
function
)
:
Promise
<
T
>
Type parameters
T
Parameters
affectedPath:
PortablePath
callback:
function
(
)
:
Promise
<
T
>
Returns
Promise
<
T
>
Returns
Promise
<
T
>
lstat
Promise
lstat
Promise
(
p
:
PortablePath
)
:
Promise
<
never
>
Parameters
p:
PortablePath
Returns
Promise
<
never
>
lstat
Sync
lstat
Sync
(
p
:
PortablePath
)
:
never
Parameters
p:
PortablePath
Returns
never
Optional
lutimes
Promise
lutimes
Promise
(
p
:
PortablePath
, atime
:
Date
|
string
|
number
, mtime
:
Date
|
string
|
number
)
:
Promise
<
void
>
Parameters
p:
PortablePath
atime:
Date
|
string
|
number
mtime:
Date
|
string
|
number
Returns
Promise
<
void
>
Optional
lutimes
Sync
lutimes
Sync
(
p
:
PortablePath
, atime
:
Date
|
string
|
number
, mtime
:
Date
|
string
|
number
)
:
void
Parameters
p:
PortablePath
atime:
Date
|
string
|
number
mtime:
Date
|
string
|
number
Returns
void
mkdir
Promise
mkdir
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
mkdir
Sync
mkdir
Sync
(
)
:
never
Returns
never
mkdirp
Promise
mkdirp
Promise
(
p
:
PortablePath
, __namedParameters
?:
object
)
:
Promise
<
string
|
undefined
>
Parameters
p:
PortablePath
Default value
__namedParameters:
object
= {}
chmod
:
undefined
|
number
utimes
:
undefined
|
[
string
|
number
|
Date
,
string
|
number
|
Date
]
Returns
Promise
<
string
|
undefined
>
mkdirp
Sync
mkdirp
Sync
(
p
:
PortablePath
, __namedParameters
?:
object
)
:
string
|
undefined
Parameters
p:
PortablePath
Default value
__namedParameters:
object
= {}
chmod
:
undefined
|
number
utimes
:
undefined
|
[
string
|
number
|
Date
,
string
|
number
|
Date
]
Returns
string
|
undefined
move
Promise
move
Promise
(
fromP
:
PortablePath
, toP
:
PortablePath
)
:
Promise
<
void
>
Parameters
fromP:
PortablePath
toP:
PortablePath
Returns
Promise
<
void
>
move
Sync
move
Sync
(
fromP
:
PortablePath
, toP
:
PortablePath
)
:
void
Parameters
fromP:
PortablePath
toP:
PortablePath
Returns
void
open
Promise
open
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
open
Sync
open
Sync
(
)
:
never
Returns
never
opendir
Promise
opendir
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
opendir
Sync
opendir
Sync
(
)
:
never
Returns
never
preserve
Time
Promise
preserve
Time
Promise
(
p
:
PortablePath
, cb
:
function
)
:
Promise
<
void
>
Parameters
p:
PortablePath
cb:
function
(
)
:
Promise
<
PortablePath
|
void
>
Returns
Promise
<
PortablePath
|
void
>
Returns
Promise
<
void
>
preserve
Time
Sync
preserve
Time
Sync
(
p
:
PortablePath
, cb
:
function
)
:
Promise
<
void
>
Parameters
p:
PortablePath
cb:
function
(
)
:
PortablePath
|
void
Returns
PortablePath
|
void
Returns
Promise
<
void
>
read
File
Promise
read
File
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
read
File
Sync
read
File
Sync
(
)
:
never
Returns
never
read
Json
Promise
read
Json
Promise
(
p
:
PortablePath
)
:
Promise
<
any
>
Parameters
p:
PortablePath
Returns
Promise
<
any
>
read
Json
Sync
read
Json
Sync
(
p
:
PortablePath
)
:
any
Parameters
p:
PortablePath
Returns
any
read
Promise
read
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
read
Sync
read
Sync
(
)
:
never
Returns
never
readdir
Promise
readdir
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
readdir
Sync
readdir
Sync
(
)
:
never
Returns
never
readlink
Promise
readlink
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
readlink
Sync
readlink
Sync
(
)
:
never
Returns
never
realpath
Promise
realpath
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
realpath
Sync
realpath
Sync
(
)
:
never
Returns
never
remove
Promise
remove
Promise
(
p
:
PortablePath
, __namedParameters
?:
object
)
:
Promise
<
void
>
Parameters
p:
PortablePath
Default value
__namedParameters:
object
= {}
max
Retries
:
number
recursive
:
boolean
Returns
Promise
<
void
>
remove
Sync
remove
Sync
(
p
:
PortablePath
, __namedParameters
?:
object
)
:
void
Parameters
p:
PortablePath
Default value
__namedParameters:
object
= {}
recursive
:
boolean
Returns
void
rename
Promise
rename
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
rename
Sync
rename
Sync
(
)
:
never
Returns
never
resolve
resolve
(
)
:
never
Returns
never
rmdir
Promise
rmdir
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
rmdir
Sync
rmdir
Sync
(
)
:
never
Returns
never
stat
Promise
stat
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
stat
Sync
stat
Sync
(
)
:
never
Returns
never
symlink
Promise
symlink
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
symlink
Sync
symlink
Sync
(
)
:
never
Returns
never
truncate
Promise
truncate
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
truncate
Sync
truncate
Sync
(
)
:
never
Returns
never
unlink
Promise
unlink
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
unlink
Sync
unlink
Sync
(
)
:
never
Returns
never
unwatch
File
unwatch
File
(
)
:
never
Returns
never
utimes
Promise
utimes
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
utimes
Sync
utimes
Sync
(
)
:
never
Returns
never
watch
watch
(
)
:
never
Returns
never
watch
File
watch
File
(
)
:
never
Returns
never
write
File
Promise
write
File
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
write
File
Sync
write
File
Sync
(
)
:
never
Returns
never
write
Json
Promise
write
Json
Promise
(
p
:
PortablePath
, data
:
any
)
:
Promise
<
void
>
Parameters
p:
PortablePath
data:
any
Returns
Promise
<
void
>
write
Json
Sync
write
Json
Sync
(
p
:
PortablePath
, data
:
any
)
:
void
Parameters
p:
PortablePath
data:
any
Returns
void
write
Promise
write
Promise
(
)
:
Promise
<
never
>
Returns
Promise
<
never
>
write
Sync
write
Sync
(
)
:
never
Returns
never
"scripts/extract-
hooks"
acceptance-
tests
plugin-
compat
plugin-
constraints
plugin-
dlx
plugin-
essentials
plugin-
exec
plugin-
file
plugin-
git
plugin-
github
plugin-
http
plugin-
init
plugin-
interactive-
tools
plugin-
link
plugin-
nm
plugin-
npm
plugin-
npm-
cli
plugin-
pack
plugin-
patch
plugin-
pnp
plugin-
pnpm
plugin-
stage
plugin-
typescript
plugin-
version
plugin-
workspace-
tools
vscode-
zipfs
yarnpkg-
builder
yarnpkg-
cli
yarnpkg-
core
yarnpkg-
doctor
yarnpkg-
extensions
yarnpkg-
fslib
NoFS
constructor
path
Utils
instance
access
Promise
access
Sync
append
File
Promise
append
File
Sync
change
File
Promise
change
File
Sync
chmod
Promise
chmod
Sync
chown
Promise
chown
Sync
close
Promise
close
Sync
copy
File
Promise
copy
File
Sync
copy
Promise
copy
Sync
create
Read
Stream
create
Write
Stream
exists
Promise
exists
Sync
fchmod
Promise
fchmod
Sync
fchown
Promise
fchown
Sync
fstat
Promise
fstat
Sync
ftruncate
Promise
ftruncate
Sync
gen
Traverse
Promise
get
Extract
Hint
get
Real
Path
link
Promise
link
Sync
lock
Promise
lstat
Promise
lstat
Sync
lutimes
Promise
lutimes
Sync
mkdir
Promise
mkdir
Sync
mkdirp
Promise
mkdirp
Sync
move
Promise
move
Sync
open
Promise
open
Sync
opendir
Promise
opendir
Sync
preserve
Time
Promise
preserve
Time
Sync
read
File
Promise
read
File
Sync
read
Json
Promise
read
Json
Sync
read
Promise
read
Sync
readdir
Promise
readdir
Sync
readlink
Promise
readlink
Sync
realpath
Promise
realpath
Sync
remove
Promise
remove
Sync
rename
Promise
rename
Sync
resolve
rmdir
Promise
rmdir
Sync
stat
Promise
stat
Sync
symlink
Promise
symlink
Sync
truncate
Promise
truncate
Sync
unlink
Promise
unlink
Sync
unwatch
File
utimes
Promise
utimes
Sync
watch
watch
File
write
File
Promise
write
File
Sync
write
Json
Promise
write
Json
Sync
write
Promise
write
Sync
yarnpkg-
libui
yarnpkg-
libzip
yarnpkg-
nm
yarnpkg-
parsers
yarnpkg-
pnp
yarnpkg-
pnpify
yarnpkg-
sdks
yarnpkg-
shell
Generated using
TypeDoc
Prefer using
copyPromise
instead