Creating Files and Directories?


Simple API question here. What do you need to require to instantiate Files and Directories?

Atom’s core requires them from atom/node-pathwatcher. If I add a dependency on pathwatcher in my module, it breaks because it uses a isn’t version-synced with the package in core and loads the wrong dylib (I think). I might be able to just require the same version that Atom’s core does, but that seems too fragile.

Am I missing something simple?


Is this the error that you’re getting?

Failed to activate package named 'atom-test' Error: Module version mismatch. Expected 13, got 11.


Yeah, that’s it exactly. Did I misread what it meant?


From your branch in atom-cloud-sync I was able to add

    "pathwatcher": "^1.0"

Then require it in one of the modules that got loaded. At first it wasn’t working right but after closing out and running

apm update
apm upgrade
apm install

I was able to require and use pathwatcher just fine.


:cool:, that works for the moment, at least. Thanks!


Also: it’s quite useful that atom.project.getRootDirectory() returns spec/fixtures by default. :grin: