Skip to content

Commit b96d7f5

Browse files
committed
fix: createTempFolder
1 parent 5b10e3b commit b96d7f5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/grammar-utils.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ const GrammarUtils = {
2525
return temp.path({ dir: this.tempFilesDir, prefix, suffix: extension })
2626
},
2727

28+
// Public: Create a temporary directory
29+
//
30+
// Returns the {String} filepath of the new folder
31+
createTempFolder(prefix = "") {
32+
this.ensureTempDir()
33+
return temp.mkdirSync({ dir: this.tempFilesDir, prefix })
34+
},
35+
2836
// Public: Create a temporary file with the provided code
2937
//
3038
// * `code` A {String} containing some code

0 commit comments

Comments
 (0)