Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

clipboard-files

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clipboard-files

A cross-platform Node.js native addon for reading or writing file paths to the clipboard. Supports Windows, MacOS and Linux.

latest
Source
npmnpm
Version
3.0.0
Version published
Weekly downloads
197
162.67%
Maintainers
1
Weekly downloads
 
Created
Source

clipboard-files

A cross-platform Node.js native addon for reading or writing file paths to the clipboard. Supports Windows, MacOS and Linux.

Install

npm i clipboard-files

Usage

const clipboard = require("clipboard-files");

// Read file paths from clipboard
const files = clipboard.readFiles();
console.log("Files in clipboard:", files);

// Write file paths to clipboard
clipboard.writeFiles(["/path/to/file1.txt", "/path/to/file2.txt"]);

API

readFiles()

Returns an array of strings containing file paths from the clipboard.

writeFiles(files: string[])

Writes an array of file paths to the clipboard.

  • files: Array of strings, each representing a file path

Platform Support

  • Windows
  • macOS
  • Linux (X11)
    • Requires X11 development libraries
    • Install on Ubuntu/Debian: sudo apt-get install libx11-dev
    • Install on Fedora: sudo dnf install libX11-devel

License

MIT

Keywords

clipboard

FAQs

Package last updated on 04 Oct 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