Skip to content

Commit

Permalink
fix: createTempFolder
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Mar 22, 2021
1 parent 5b10e3b commit b96d7f5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/grammar-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ const GrammarUtils = {
return temp.path({ dir: this.tempFilesDir, prefix, suffix: extension })
},

// Public: Create a temporary directory
//
// Returns the {String} filepath of the new folder
createTempFolder(prefix = "") {
this.ensureTempDir()
return temp.mkdirSync({ dir: this.tempFilesDir, prefix })
},

// Public: Create a temporary file with the provided code
//
// * `code` A {String} containing some code
Expand Down

0 comments on commit b96d7f5

Please sign in to comment.