Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Matt Broadstone
    @mbroadst
    @es128 the same code doesn't work on linux though
    digging into that quickly..
    I'm a bit pressed for time atm, but I can verify that listening to a directory like '/some/path/*.pid' doesn't work using node 0.10.25 at least
    (we're stuck on 0.10 for now unfortunately)
    Elan Shanker
    @es128
    you sure you’re not accidentally using an absolute path when you intend it to be relative?
    Matt Broadstone
    @mbroadst
    I'm using an absolute path, and intend for it to be absolute
    Elan Shanker
    @es128
    And the pid files are directly in /some/path/? Not deeper in a subdirectory?
    Matt Broadstone
    @mbroadst
    var watcher = chokidar.watch('/var/run/something*.pid', { persistent: true });
    all top level pids
    that results in no messages whatsoever
    Elan Shanker
    @es128
    something?
    Matt Broadstone
    @mbroadst
    sorry I typed that in wrong, it's not that way in my code though, here's the code:
    var chokidar = require('chokidar');
    
    var path = '/var/run/something';
    var watcher = chokidar.watch(path + '/*.pid', {
      cwd: path,
      persistent: true
    });
    
    watcher
      .on('add', function(file) { console.log('added: ' + file); })
      .on('unlink', function(file) { console.log('removed: ' + file); })
      .on('error', function(err) { console.log('error: ' + err); });
    Elan Shanker
    @es128
    trying locally, using any glob on /var/run yields no add events, while just watching /var/run directly does. I don’t know why
    Matt Broadstone
    @mbroadst
    that works on OSX + node 0.12.7, but not on ubuntu 14.04 + node 0.10.25
    I'm reverting to the isPidFile approach for now, but just wanted to provide the bug report
    Elan Shanker
    @es128
    appreciate it…. It does seem like /var/run may be some sort of special case
    I don’t yet understand how or why
    Matt Broadstone
    @mbroadst
    yeah seems to be the case
    I just switched path to my home dir and it works fine
    Matt Broadstone
    @mbroadst
    would you prefer I open a new issue for that particular case?
    Elan Shanker
    @es128
    no, will just leave a note in the existing one
    Alex Chumbley
    @chums923
    Hi, I was wondering if I missed something in the docs and maybe there was a way of watching for a file rename - besides capturing a file addition and deletion
    From what I can tell, there isn't an event that says something like "File 'A' was renamed to file 'B'"
    Elan Shanker
    @es128
    Correct, there is no such event exposed by chokidar because it cannot be provided consistently
    more discussion of that at paulmillr/chokidar#303
    Ricardo A. Rubio
    @rickarubio
    Hi, just curious, is there a way to do the opposite of path filtering - ignored?
    ie: I would like to watch a directory and only watch for *.log files
    and filter out anything that doesn't match *.log
    if this does not exist, is it a feature you would like implemented in chokidar ?
    Ricardo A. Rubio
    @rickarubio
    @mbroadst ah, just found out I can pass a glob to the first argument of watcher, nevermind the above :)
    E-Hern Lee
    @somebody1234
    @/all How would I specify directories/files to ignore? (i.e. how do the regexes need to be modified for only directories/only files?)
    Elan Shanker
    @es128
    @somebody1234 did my answer in paulmillr/chokidar#492 suffice? Or are you still in need of help?
    hellboy81
    @hellboy81
    Hi
    .on('add', function(file) { console.log('added: ' + file); })
    why this event fired always an beginning?
    Even this files are exists
    On windows 7 64 bit platform / Node.js 0.12 /4.x/5.x
    @es128
    If file has been changed (i.e. saved in external editor) - `.on('change' event is fired
    hellboy81
    @hellboy81
    paulmillr/chokidar#521
    Jonathan Lake
    @jwtlake
    Are there any good solutions for ignoring hidden files on windows? We are using {ignored: /[\/\\]\./} to ignore dot files on linux but I'm not quite sure what should be done for windows.
    Elan Shanker
    @es128
    I’m not sure how you determine whether a windows file is hidden or not to begin with within node, but if you can do that you could set ignored to a function that returns true on hidden files (and any other files you wish to ignore)
    @shmulim
    @shmulim
    I'm trying to watch a server directory and fire off a trigger when uploading finishes. How would I go about with something like that?
    Ah, I see an interesting solution here: paulmillr/chokidar#215
    Arye Shalev
    @pantchox
    hello, where is the chokidar documentation? i mean for all events and specific what each event receive, i could not find it, thanks!
    Arye Shalev
    @pantchox
    for example the "addDir" event receive path and an object, the object has many proprties how am i suppose to know what each means? i could not find any documentation on this
    HadiChan
    @HadiChen
    How to do only monitor a directory, subdirectories do not listen to it
    How to do only monitor a directory, subdirectories do not monitor it?
    Because I just need to determine whether the current directory of new documents, do not need to tube catalog, how do I operate
    Ash
    @ashthespy
    @HadiChen Check out the option depth