Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Nov 26, 2018
1 parent bd2415d commit 88e2b36
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
21 changes: 21 additions & 0 deletions docs/api/app.md
Expand Up @@ -533,6 +533,27 @@ You can request the following paths by the name:
* `logs` Directory for your app's log folder.
* `pepperFlashSystemPlugin` Full path to the system version of the Pepper Flash plugin.

### `app.getFileIcon(path[, options], callback)`

* `path` String
* `options` Object (optional)
* `size` String
* `small` - 16x16
* `normal` - 32x32
* `large` - 48x48 on _Linux_, 32x32 on _Windows_, unsupported on _macOS_.
* `callback` Function
* `error` Error
* `icon` [NativeImage](native-image.md)

Fetches a path's associated icon.

On _Windows_, there a 2 kinds of icons:

- Icons associated with certain file extensions, like `.mp3`, `.png`, etc.
- Icons inside the file itself, like `.exe`, `.dll`, `.ico`.

On _Linux_ and _macOS_, icons depend on the application associated with file mime type.

### `app.getFileIcon(path[, options])`

* `path` String
Expand Down
23 changes: 0 additions & 23 deletions docs/api/breaking-changes.md
Expand Up @@ -8,29 +8,6 @@ The `FIXME` string is used in code comments to denote things that should be fixe

# Planned Breaking API Changes (5.0)

## `app.getFileIcon(path[, options], callback)`

The `getFileIcon` function on `app` taking a callback is being deprecated in favor of a version returning a Promise.

```js
const path = 'some/path/to/your/icon'
// Deprecated
app.getFileIcon(path, (err, icon) => {
if (err) {
console.log('oh no an error!', err)
} else {
console.log(icon)
}
})
// Replace With
app.getFileIcon(path)
.then(icon => {
console.log(icon)
}).catch(err => {
console.log('oh no an error!', err)
})
```

## `new BrowserWindow({ webPreferences })`

The following `webPreferences` option default values are deprecated in favor of the new defaults listed below.
Expand Down

0 comments on commit 88e2b36

Please sign in to comment.