Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Add support for opening files at startup. #2653

Merged
merged 1 commit into from
Feb 15, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,15 @@ define(function (require, exports, module) {

PerfUtils.addMeasurement("Application Startup");
});

// See if any startup files were passed to the application
if (brackets.app.getPendingFilesToOpen) {
brackets.app.getPendingFilesToOpen(function (err, files) {
files.forEach(function (filename) {
CommandManager.execute(Commands.FILE_OPEN, { fullPath: filename });
});
});
}
});
});

Expand Down