Skip to content

AnyFetch/file-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnyFetch File Watcher

Build StatusDependency Status Coverage Status NPM version

Setup

npm install -g anyfetch-file-watcher --production

Usage

You need an access-token from AnyFetch. If you are not interested with OAuth, a simple authenticated call to GET https://api.anyfetch.com/token will retrieve one for you.

anyfetch-file-watcher $DIRECTORY_TO_WATCH $ACCESS_TOKEN

The command is long running, and will watch for file changes until the process dies.

You can omit the $ACCESS_TOKEN and enter it interactively.

Environment variables

You can define a BULK_SAVE variable to modify the number of files to save in the cursor at the same time. Default: 20

Reset

Every time you run this command, a JSON file is stored in ~/.anyfetch-file-watcher/$STRIPPED_DIRECTORY.json with cursor details. If you want to resend everything, remove this file.

Known bugs

There is a bug in local files deletion detection if these files have non ascii character in their name.