Skip to content

A nodejs addon, read or write file paths for clipboard, supports win32 and mac osx.

License

Notifications You must be signed in to change notification settings

alex8088/clipboard-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clipboard-files

A nodejs addon, read or write file paths for clipboard, supports win32 and mac osx.

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

License

MIT