New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

link-unlink

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

link-unlink

Link and unlink with saving and restoring the previous file or directory

  • 0.1.24
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
230
decreased by-76.22%
Maintainers
0
Weekly downloads
 
Created
Source

Link and unlink with saving and restoring the previous file or directory

import { link, unlink } from 'link-unlink';

// if '/path/to/link' exists, it is moved to '/path/to/link.abcde1234' and regardless '/path/to/file_or_folder' -> '/path/to/link'
await link('/path/to/file_or_folder', '/path/to/link'); 

// if '/path/to/link.abcde1234' exists, it is restored to '/path/to/link' otherwise it will be removed
await unlink('/path/to/link'); 

Documentation

API Docs

Keywords

FAQs

Package last updated on 24 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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