question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Adding" files/folders emitter NOT fired. (Mac OS X 10.11)

See original GitHub issue

Proof is in pudding…

var gaze = require('gaze'),
       t = require('touch'),
    base = '/private/var/tmp/',
existing = base + 'existingfile' + Math.random(), 
 newfile = base + 'newfile' + Math.random()

touch.sync(existing)

gaze (base + '*', function(err, watcher){
    this.on('all', function(event, filepath) {
        console.log (filepath + ' was ' + event)
    })
    setTimeout(function () {
        touch(newfile) // This will never be noticed.
        touch(existing) // Touching existing files works ok.
    }, 3000);
})

/private/var/tmp/existingfile0.5537692755460739 was changed

The new file that also got touched /private/var/tmp/newfileXYZ.... _never gets a notification_ 👎

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
shamacommented, Nov 9, 2015

Gaze uses file patterns instead of file paths to watch files. Try this instead:

gaze('*', { cwd: base }, function () {
  this.on('all', function (event, filepath) {
    console.log(filepath + ' was ' + event)
  })
})
0reactions
TehShrikecommented, Nov 17, 2017

I suspect this is a duplicate of #167.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues - GitHub
TehShrike mentioned this issue on Nov 17, 2017. "Adding" files/folders emitter NOT fired. (Mac OS X 10.11) #205.
Read more >
Change permissions for files, folders, or disks on Mac
Change permissions for files, folders, or disks on Mac. Permission settings determine who can view and alter files on the computer.
Read more >
Why is my tablet not working on Mac OS? - Wacom Support
Your tablet may not be working on recent a Mac OS computer due to security settings. Recent Mac OS versions added many security...
Read more >
Running Visual Studio Code on macOS
Add VS Code to your Dock by right-clicking on the icon, located in the Dock, to bring up the context menu and choosing...
Read more >
Scroll Reverser for macOS - Pilotmoon Software
For OS X 10.7—10.11 (Intel): Download Scroll Reverser 1.7.6 (11 May 2017). For OS X 10.4 (PowerPC) and 10.5—10.6 (Intel 32 and 64-bit):...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found