File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1027,6 +1027,13 @@ Avoid calling it more than once in an asynchronous context as one call
10271027might refresh the temporary directory of a different context, causing
10281028the test to fail somewhat mysteriously.
10291029
1030+ ### ` resolve([...paths]) `
1031+
1032+ * ` ...paths ` [ \< string>] [ <string> ]
1033+ * return [ \< string>] [ <string> ]
1034+
1035+ Resolves a sequence of paths into absolute path in the temporary directory.
1036+
10301037### ` hasEnoughSpace(size) `
10311038
10321039* ` size ` [ \< number>] [ <number> ] Required size, in bytes.
Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ function onexit() {
5555 }
5656}
5757
58+ function resolve ( ...paths ) {
59+ return path . resolve ( tmpPath , ...paths ) ;
60+ }
61+
5862function hasEnoughSpace ( size ) {
5963 const { bavail, bsize } = fs . statfsSync ( tmpPath ) ;
6064 return bavail >= Math . ceil ( size / bsize ) ;
@@ -64,4 +68,5 @@ module.exports = {
6468 path : tmpPath ,
6569 refresh,
6670 hasEnoughSpace,
71+ resolve,
6772} ;
You can’t perform that action at this time.
0 commit comments