1
0
mirror of https://github.com/fuse-friends/fuse-native synced 2024-10-27 18:34:01 +00:00
fuse-friends_fuse-native/test/fixtures/mnt.js
2020-01-29 13:32:31 +01:00

20 lines
343 B
JavaScript

var os = require('os')
var path = require('path')
var fs = require('fs')
function create (opts = {}) {
var mnt = path.join(os.tmpdir(), 'fuse-bindings-' + process.pid + '-' + Date.now())
if (!opts.doNotCreate) {
try {
fs.mkdirSync(mnt)
} catch (err) {
// do nothing
}
}
return mnt
}
module.exports = create