Last active
August 29, 2015 14:03
-
-
Save sbruchmann/ba1c060847b7def0630d to your computer and use it in GitHub Desktop.
Writing files in Brackets extensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function () { | |
"use strict"; | |
var AppInit = brackets.getModule("utils/AppInit"), | |
FileSystem = brackets.getModule("filesystem/FileSystem"), | |
ProjectManager = brackets.getModule("project/ProjectManager"); | |
AppInit.appReady(function () { | |
var filename = ProjectManager.getProjectRoot().fullPath + "hello-world.txt"; | |
FileSystem.getFileForPath(filename).write("Hello world!\n"); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment