File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1062,6 +1062,13 @@ Avoid calling it more than once in an asynchronous context as one call
1062
1062
might refresh the temporary directory of a different context, causing
1063
1063
the test to fail somewhat mysteriously.
1064
1064
1065
+ ### ` resolve([...paths]) `
1066
+
1067
+ * ` ...paths ` [ \< string>] [ <string> ]
1068
+ * return [ \< string>] [ <string> ]
1069
+
1070
+ Resolves a sequence of paths into absolute path in the temporary directory.
1071
+
1065
1072
### ` hasEnoughSpace(size) `
1066
1073
1067
1074
* ` size ` [ \< number>] [ <number> ] Required size, in bytes.
Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ function onexit(useSpawn) {
70
70
}
71
71
}
72
72
73
+ function resolve ( ...paths ) {
74
+ return path . resolve ( tmpPath , ...paths ) ;
75
+ }
76
+
73
77
function hasEnoughSpace ( size ) {
74
78
const { bavail, bsize } = fs . statfsSync ( tmpPath ) ;
75
79
return bavail >= Math . ceil ( size / bsize ) ;
@@ -87,4 +91,5 @@ module.exports = {
87
91
hasEnoughSpace,
88
92
path : tmpPath ,
89
93
refresh,
94
+ resolve,
90
95
} ;
You can’t perform that action at this time.
0 commit comments