Questions tagged [file-watcher]

A utility or library to perform actions when files are updated, added or deleted.

Common issues for file watcher utilities include

  • How to determine when files being added are fully available (IE: If a file is being FTPed to a directory, has the FTP process finished?)
  • How to notify interested consumers that a file has been updated/added/deleted
  • Scheduling issues such as whether the file watcher runs continuously or every xx seconds or minutes.
  • Whether a file is moved/archived after processing
  • Whether multiple input files that match a wildcard can be processed concurrently.

If your question is about the .NET component FileSystemWatcher also include the tag . For the Qt toolkit QFileSystemWatcher class also include the tag .

332 questions
1
vote
1 answer

ASP.NET MVC 5 detect new file end execute function in background server side

I need to to be able to detect a .csv file which will be dropped on an FTP Server. When the file is transferred it should trigger code to read the file and then upload all the information from the .csv file to a SQL Server. After the file is…
user2806570
  • 821
  • 2
  • 12
  • 25
1
vote
1 answer

Bash: run command on file change and on standard input

I have a nice file watcher using fswatch: cmd="go install ./..." $cmd fswatch -0 ./ | while read -d "" event; do echo "File Changed: $event" $cmd done Now I also want to listen for input at the command-line, so if I type in anything, $cmd will…
1
vote
1 answer

File watcher doesn't generate CSS from Less file in PhpStorm

I'm trying to setup a file watcher for my style.less file. path to my less file: themes/lessbuilt/less/style.less path to my css file: themes/lessbuilt/css In my style.less file I've just referenced a child theme and added some…
nash63
  • 59
  • 1
  • 12
1
vote
1 answer

Is it possible to configure watchman triggers in .watchmanconfig?

Facebook watchman docs describe how to configure triggers by passing json into the command like so: watchman --json-command < ./tasks/cmds/watchman-build-trigger.json where watchman-build-trigger.json contains the following: [ "trigger", …
user56512
1
vote
1 answer

Configure PhpStorm to import watchers automatically at project start

I have setup some file watchers (like: jshint, uglifyjs, sass, ...) in PhpStorm. Already I've exported them into a xml file extension for later use in my upcoming projects. I could manually import this file at the beginning of every project that I…
AHP
  • 58
  • 4
1
vote
1 answer

Using FileWatcher with Multithreading

I am trying to integrate Multithreading with FileWatcher service in java. i.e., I am constantly listening to a particular directory -> whenever a new file is created, I need to spawn a new thread which processes the file (say it prints the file…
1
vote
1 answer

Can webpack watch for changes in .php files?

Let's say I have a file structure like: I'd like webpack command to watch for changes in the src/functions.php and implement them in the dist/functions.php. Basically all it needs to do is copy and paste if there are any changes. Is this something…
1
vote
1 answer

UWP FileWatcher BackgroundTask

I'm new here and currently programming a Windows 10 Desktop UWP for my company, which should check a txt-file by a background task and update the UWP tile / UWP secondary tile. Checking the users libraries by using the…
T. Fischer
  • 23
  • 3
1
vote
0 answers

File.Move on SND: The process cannot access the file because it is being used by another process

I have a file watcher windows service that moves a dropped file from folder A to folder B. File movement in this setup was successful, but when I shared the same folder and drop a file using the shared path, I always get an error indicating The…
Jan Lyndon Jasa
  • 162
  • 1
  • 10
1
vote
2 answers

Windows service is not working as expected - C#

I've built a windows service using FileWatcher class. It has to detect the incoming files in a folder and move them to the new location. My code is running fine as console application but not working as Windows service.The files are staying in the…
METALHEAD
  • 2,734
  • 3
  • 22
  • 37
1
vote
1 answer

How to use a relative program path in a PhpStorm file watcher

In PhpStorm (as well as other JetBrains IDEs, I'm sure), I'm setting up a File Watcher. In the Watcher Settings section, it asks me to specify the path to the program to be executed. I want to use the executable file within the node_modules/.bin…
Travesty3
  • 14,351
  • 6
  • 61
  • 98
1
vote
1 answer

Use File Watcher in IntelliJ to run Makefile

I would like to run a Makefile in IntelliJ whenever a source file changes. Therefore I installed the File Watcher plugin and added a new File Watcher for Go files. In the Watcher Settings I added make as the Program and test for the Arguments. When…
Michael Lihs
  • 7,460
  • 17
  • 52
  • 85
1
vote
1 answer

LESSC Compiling Included Files Into CSS

I have the following file structure: --public_html/ - css/ - less/ - _mixins.less - _variables.less - _theme.less - main.less I am using PhpStorm with a File Watcher running LESSC from NPM. My file watcher is as…
Wildcard27
  • 1,437
  • 18
  • 48
1
vote
1 answer

Bind multiple events in node-hound?

I am using node-hound as a directory watcher. hound = require('hound'); watcher = hound.watch('/dir'); watcher.on('create', function(file) { console.log('hello'); }); watcher.on('change', function(file) { …
R T
  • 1,038
  • 9
  • 17
1
vote
1 answer

PhpStorm file watcher does not watch for MJML files

I have installed the MJML from node package manager globally and then created a mjml filetype in PhpStorm and added a new File Watcher for MJML files with the following settings. Name: MJML Type: MJML from the dropdown Program:…
forethought
  • 2,913
  • 2
  • 16
  • 26