Comparing version 0.1.0 to 0.1.1
@@ -30,3 +30,3 @@ const p = require('path') | ||
const { recursive, force } = options | ||
if(await this.exists(path) && !force) return false | ||
if(!force && await this.exists(path)) return false | ||
try { | ||
@@ -33,0 +33,0 @@ await fs.promises.mkdir(path, { recursive }) |
@@ -24,6 +24,7 @@ const p = require('path') | ||
const path = p.join(this.path, name) | ||
if(!force || await this.exists(path)) return false | ||
if(!force && await this.exists(path)) return null | ||
await fs.promises.appendFile(path, data) | ||
this.children.push(new Hotfile(path)) | ||
return true | ||
const file = new Hotfile(path) | ||
this.children.push(file) | ||
return file | ||
} | ||
@@ -33,4 +34,4 @@ | ||
const path = p.join(this.path, name) | ||
console.log({path}) | ||
await this.mkdir(path, options) | ||
if(!force && await this.exists(path)) return null | ||
const folder = new Hotfolder(path) | ||
@@ -37,0 +38,0 @@ this.children.push(folder) |
{ | ||
"name": "hotfile", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9748
188