Nix fs.async.* methods. They aren't needed now.

This commit is contained in:
Corey Johnson & Nathan Sobo 2012-08-30 16:12:15 -06:00
parent 08b9d69f59
commit bd1982ede1
4 changed files with 0 additions and 36 deletions

View File

@ -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;

View File

@ -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]);

View File

@ -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)

View File

@ -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