mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-13 08:44:12 +03:00
Nix fs.async.* methods. They aren't needed now.
This commit is contained in:
parent
08b9d69f59
commit
bd1982ede1
@ -25,9 +25,6 @@ var $native = {};
|
||||
native function remove(path);
|
||||
$native.remove = remove;
|
||||
|
||||
native function asyncList(path, recursive, callback);
|
||||
$native.asyncList = asyncList;
|
||||
|
||||
native function open(path);
|
||||
$native.open = open;
|
||||
|
||||
|
@ -159,9 +159,6 @@ bool Native::Execute(const CefString& name,
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (name == "asyncList") {
|
||||
return false;
|
||||
}
|
||||
else if (name == "writeToPasteboard") {
|
||||
NSString *text = stringFromCefV8Value(arguments[0]);
|
||||
|
||||
|
@ -96,20 +96,3 @@ describe "fs", ->
|
||||
describe ".md5ForPath(path)", ->
|
||||
it "returns the MD5 hash of the file at the given path", ->
|
||||
expect(fs.md5ForPath(require.resolve('fixtures/sample.js'))).toBe 'dd38087d0d7e3e4802a6d3f9b9745f2b'
|
||||
|
||||
describe ".async", ->
|
||||
directoryPath = null
|
||||
beforeEach ->
|
||||
directoryPath = require.resolve 'fixtures/dir'
|
||||
|
||||
describe ".listTree(directoryPath)", ->
|
||||
it "returns a promise that resolves to the recursive contents of that directory", ->
|
||||
waitsForPromise ->
|
||||
fs.async.listTree(directoryPath).done (result) ->
|
||||
expect(result).toEqual fs.listTree(directoryPath)
|
||||
|
||||
describe ".list(directoryPath)", ->
|
||||
it "returns a promise that resolves to the contents of that directory", ->
|
||||
waitsForPromise ->
|
||||
fs.async.list(directoryPath).done (result) ->
|
||||
expect(result).toEqual fs.list(directoryPath)
|
||||
|
@ -116,16 +116,3 @@ module.exports =
|
||||
|
||||
md5ForPath: (path) ->
|
||||
$native.md5ForPath(path)
|
||||
|
||||
async:
|
||||
list: (path) ->
|
||||
deferred = $.Deferred()
|
||||
$native.asyncList path, false, (subpaths) ->
|
||||
deferred.resolve subpaths
|
||||
deferred
|
||||
|
||||
listTree: (path) ->
|
||||
deferred = $.Deferred()
|
||||
$native.asyncList path, true, (subpaths) ->
|
||||
deferred.resolve subpaths
|
||||
deferred
|
||||
|
Loading…
Reference in New Issue
Block a user