Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.0.0 to 0.0.1

19

index.js

@@ -27,3 +27,3 @@ const p = require('path')

return fs.promises.mkdir(path, { recursive: true })
.then(() => true).catch(() => false)
.then(() => new Hotfile(path)).catch(() => false)
}

@@ -54,4 +54,4 @@

toPath = toPath + '/' + this.filename()
return fs.promises.rename(this.path, toPath).then(() => {
Object.assign(this, new Hotfile(toPath))
return fs.promises.rename(this.path, toPath).then(async () => {
await Object.assign(this, new Hotfile(toPath))
return true

@@ -62,6 +62,9 @@ }).catch(() => false)

async move(toPath){
return fs.promises.rename(this.path, toPath).then(() => {
Object.assign(this, new FileManager(toPath))
return fs.promises.rename(this.path, toPath).then(async () => {
await Object.assign(this, new Hotfile(toPath))
return true
}).catch(() => false)
}).catch((err) => {
console.log(err)
return false
})
}

@@ -81,4 +84,4 @@

async delete(){
return fs.promises.unlink(this.path).then(() => {
Object.assign(this,{parent: null, path: null, name: null, metadata: null})
return fs.promises.unlink(this.path).then(async () => {
await Object.assign(this,{parent: null, path: null, name: null, metadata: null})
return true

@@ -85,0 +88,0 @@ }).catch(() => false)

{
"name": "hotfile",
"version": "0.0.0",
"version": "0.0.1",
"description": "",

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

@@ -21,3 +21,3 @@ # hotfile

const hotfile = new hf(file)
await hotfile.movieTo(hotdir)
await hotfile.moveTo(hotdir)
```
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