node.js - Create desktop folder electron -


i'm using node fs create directory , watch in electron app. users can use directory upload documents. use chokidar watch directory documents. works locally; fs creates directory inside app folder. can drag , drop files in, works.

this doesn't work, however, when deploy app windows. i've searched filesystem , cannot find folder created.

what i'd create folder on desktop. cooler if react movements of folder (e.g. user moves documents).

is there way to

  1. create folder on desktop (both osx , windows)
  2. listen when folder has been moved location.

thanks!

update

found way find desktop directory

const dir = path.join(require('os').homedir(), 'desktop/whatever'); 

is there way number 2?


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -