Skip to content

FileManager.renameDirectory

Kerri Shotts edited this page Oct 26, 2013 · 1 revision

(part of FileManager)

Parameters:

  • path - an absolute or relative path
  • newName - the new name (optional)

Returns: Promise, resolving to the new directory

ASYNCHRONOUS

Renames the directory to the new name. It's a bit naive, since it uses the current working directory as the parent directory, so if the directory is not in the current working directory, it's liable to be moved there.

Usage

aFileManager.renameDirectory ( "dirA", "dirB" )
            .then ( ... )
            .catch ( function ( e ) { console.log ( e ); }
            .done ();
Clone this wiki locally