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

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -