UNPKG
@forabi/memfs
Version:
latest (2.7.2)
2.7.2
In-memory file-system with Node's fs API.
github.com/streamich/memfs
streamich/memfs
@forabi/memfs
/
demo
/
rename.ts
6 lines
(4 loc)
•
157 B
text/typescript
View Raw
1
2
3
4
5
6
import
{
Volume
}
from
"../src/volume"
;
const
vol =
Volume
.
fromJSON
({
'/foo/foo'
:
'bar'
}); vol.
renameSync
(
'/foo/foo'
,
'/foo/foo2'
);
console
.
log
(vol.
toJSON
());