From 1d2b2eec4cdd22398a775b1a89e2b8d008a30bb1 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 6 Jan 2014 08:49:45 -0800 Subject: [PATCH] Add Sync suffix to Directory::getEntries --- spec/directory-spec.coffee | 2 +- src/directory.coffee | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/directory-spec.coffee b/spec/directory-spec.coffee index c611a7b05..ba8a24045 100644 --- a/spec/directory-spec.coffee +++ b/spec/directory-spec.coffee @@ -68,7 +68,7 @@ describe "Directory", -> describe "on #darwin or #linux", -> it "includes symlink information about entries", -> - entries = directory.getEntries() + entries = directory.getEntriesSync() for entry in entries name = entry.getBaseName() if name is 'symlink-to-dir' or name is 'symlink-to-file' diff --git a/src/directory.coffee b/src/directory.coffee index 54433f6ca..9886a2edb 100644 --- a/src/directory.coffee +++ b/src/directory.coffee @@ -79,12 +79,12 @@ class Directory else fullPath - # Public: Reads file entries in this directory from disk. + # Public: Reads file entries in this directory from disk synchronously. # # Note: It follows symlinks. # - # Returns an Array of {Files}. - getEntries: -> + # Returns an Array of {File} and {Directory} objects. + getEntriesSync: -> directories = [] files = [] for entryPath in fs.listSync(@path)