Skip to content

[CLOSED] Add fs.makedir() and fs.rename() APIs #71

@core-ai-bot

Description

@core-ai-bot

Issue by gruehle
Wednesday Sep 26, 2012 at 14:24 GMT
Originally opened as adobe#120


Add two new functions to brackets.fs:

makedir()

/**
 * Create a new directory.
 *
 * @param {string} path The path of the directory to create.
 * @param {number} mode The permissions for the directory, in numeric format (ie 0777)
 * @param {function(err)} callback Asynchronous callback function. The callback gets one argument.
 *
 * @return None. This is an asynchronous call that sends all return information to the callback.
 **/
function makedir(path, mode, callback);

NOTE
The mode parameter of makedir() is ignored for now. The directory is created with the full
permissions available to the current user.

rename()

/**
 * Rename a file or directory.
 *
 * @param {string} oldPath The old name of the file or directory.
 * @param {string} newPath The new name of the file or directory.
 * @param {function(err)} callback Asynchronous callback function. The callback gets one argument.
 *
 * @return None. This is an asynchronous call that sends all return information to the callback.
 **/
function rename(oldPath, newPath, callback);

BONUS FEATURES
This pull request also includes two small bonus features on the mac:

  • The main window size and position is now remembered when quitting and relaunching Brackets. This change will also fix the issues on the Mac where some of the UI is not shown if the initial window size is too small (Display error on MacBook Pro (13") adobe/brackets#1689)
  • The file dialogs are now modal sheets instead of modal dialogs.

gruehle included the following code: https://github.com/adobe/brackets-shell/pull/120/commits

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions