Skip to content
Closed
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions docs/API-Reference/command/Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1053,3 +1053,15 @@ Shows authors of current file
Toggles display of untracked files

**Kind**: global variable
<a name="CMD_GIT_HISTORY_GLOBAL"></a>

## CMD\_GIT\_HISTORY\_GLOBAL
Toggles global history view in history panel

**Kind**: global variable
<a name="CMD_GIT_HISTORY_FILE"></a>

## CMD\_GIT\_HISTORY\_FILE
Toggles file history view in history panel

**Kind**: global variable
5 changes: 4 additions & 1 deletion docs/API-Reference/file/FileUtils.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ file size (in bytes)
**Kind**: global constant
<a name="readAsText"></a>

## readAsText(file, bypassCache) ⇒ <code>$.Promise</code>
## readAsText(file, bypassCache, [options]) ⇒ <code>$.Promise</code>
Asynchronously reads a file as UTF-8 encoded text.

**Kind**: global function
Expand All @@ -38,6 +38,9 @@ Asynchronously reads a file as UTF-8 encoded text.
| --- | --- | --- |
| file | <code>File</code> | File to read |
| bypassCache | <code>boolean</code> | an optional argument, if specified will read from disc instead of using cache. |
| [options] | <code>object</code> | |
| [options.ignoreFileSizeLimits] | <code>boolean</code> | Will read larger files than 16MB limit. will bypassCache + won't cache if enabled. |
| [options.doNotCache] | <code>boolean</code> | will not cache if enabled. Auto-enabled if ignoreFileSizeLimits = true |

<a name="writeText"></a>

Expand Down
16 changes: 12 additions & 4 deletions docs/API-Reference/filesystem/File.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ const File = brackets.getModule("filesystem/File")

* [File](#File)
* [new File(fullPath, fileSystem)](#new_File_new)
* [.read([options], callback)](#File+read)
* [.read(options, callback)](#File+read)
* [.write(data, [options], [callback])](#File+write)

<a name="new_File_new"></a>

### new File(fullPath, fileSystem)
Model for a File.This class should *not* be instantiated directly. Use FileSystem.getFileForPath,FileSystem.resolve, or Directory.getContents to create an instance of this class.See the FileSystem class for more details.
Model for a File.

This class should *not* be instantiated directly. Use FileSystem.getFileForPath,
FileSystem.resolve, or Directory.getContents to create an instance of this class.

See the FileSystem class for more details.


| Param | Type | Description |
Expand All @@ -26,14 +31,17 @@ Model for a File. This class should *not* be instantiated directly. Use FileSys

<a name="File+read"></a>

### file.read([options], callback)
### file.read(options, callback)
Read a file.

**Kind**: instance method of [<code>File</code>](#File)

| Param | Type | Description |
| --- | --- | --- |
| [options] | <code>Object</code> | properties \{encoding: 'one of format supported here: https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/encoding'} |
| options | <code>Object</code> | |
| [options.encoding] | <code>string</code> | 'one of format supported here: https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/encoding' |
| [options.ignoreFileSizeLimits] | <code>boolean</code> | by default max file size that can be read is 16MB. |
| [options.doNotCache] | <code>boolean</code> | will not cache if enabled. Auto-enabled if ignoreFileSizeLimits = true |
| callback | <code>function</code> | Callback that is passed the FileSystemError string or the file's contents and its stats. |

<a name="File+write"></a>
Expand Down
2 changes: 2 additions & 0 deletions src/command/Commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ define(function (require, exports, module) {
/** Toggles code beautification on save */
exports.EDIT_BEAUTIFY_CODE_ON_SAVE = "edit.beautifyOnSave"; // CodeHintManager.js _startNewSession()

exports.EDIT_EMMET = "edit.emmet"; // HTMLCodeHints CSSCodeHints

/** Opens find dialog */
exports.CMD_FIND = "cmd.find"; // FindReplace.js _launchFind()

Expand Down
2 changes: 2 additions & 0 deletions src/command/DefaultMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ define(function (require, exports, module) {
menu.addMenuItem(Commands.SHOW_CODE_HINTS);
menu.addMenuDivider();
menu.addMenuItem(Commands.TOGGLE_CLOSE_BRACKETS);
menu.addMenuItem(Commands.EDIT_EMMET);


/*
* Find menu
Expand Down
Loading