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.0 to 0.3.2

7

index.js

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

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

@@ -127,3 +130,4 @@ const { ext, name, base } = parse(path)

async moveTo(destinationPath) {
async moveTo(destinationPath, options = {}) {
const { replace } = options
const hotfolder = destinationPath instanceof Hotfile

@@ -136,2 +140,3 @@ ? destinationPath

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

@@ -138,0 +143,0 @@ return this

2

package.json
{
"name": "hotfile",
"version": "0.3.0",
"version": "0.3.2",
"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