Socket
Socket
Sign inDemoInstall

hotfile

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hotfile - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

26

index.js

@@ -7,3 +7,3 @@ const fs = require('fs')

constructor(path, options = {}) {
if(options.mkdir && !Hotfile.existsSync(path)){
if (options.mkdir && !Hotfile.existsSync(path)) {
Hotfile.mkdirSync(path)

@@ -77,3 +77,7 @@ }

if ((typeof options.depth === 'number') && !(options.depth >= currentDepth)) continue
await hotfile.loadChildren(options, currentDepth)
try {
await hotfile.loadChildren(options, currentDepth)
} catch (error) {
console.log(error)
}
}

@@ -97,3 +101,7 @@ }

if ((typeof options.depth === 'number') && !(options.depth >= currentDepth)) continue
hotfile.loadChildrenSync(options, currentDepth)
try {
hotfile.loadChildrenSync(options, currentDepth)
} catch (error) {
console.log(error)
}
}

@@ -112,2 +120,10 @@ }

createChildDirectorySync(directoryName) {
const newPath = resolve(this.path, directoryName)
Hotfile.mkdirSync(newPath)
const hotfolder = new Hotfile(newPath)
this.children.push(hotfolder)
return hotfolder
}
async delete() {

@@ -125,3 +141,3 @@ await fs.promises.unlink(this.path)

updateMetadata(newPath){
updateMetadata(newPath) {
this.path = newPath

@@ -150,3 +166,3 @@ const { name, base, ext } = parse(newPath)

this.updatePath(newPath)
if(await Hotfile.exists(newPath) && !replace) return null
if (await Hotfile.exists(newPath) && !replace) return null
await fs.promises.rename(oldPath, newPath)

@@ -153,0 +169,0 @@ return this

2

package.json
{
"name": "hotfile",
"version": "0.3.4",
"version": "0.3.5",
"description": "Hotfile makes working with folders and files in node-js easy and clear.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc