Skip to content
This repository was archived by the owner on Jun 26, 2019. It is now read-only.

Directory

frenzylabs edited this page Dec 14, 2010 · 1 revision

CoreJS offers solid basic directory interaction. The Directory module is included in the global namespace and does not need to be required.

// Create a Directory: (returns true if successful, and throws error on failure)
Directory.create("/path/to/your/directory");

// Remove a Directory: (returns undefined if successful and throws error on failure)
Directory.remove("/path/to/directory");

// List contents of a Directory: (returns array of contents if successful, throws error on failure)
var myDirectoryContents = Directory.list("/path/to/dir/");

// Test if item is a Directory: (returns true or false)
Directory.isDirectory("/path/to/dir");

Clone this wiki locally