feat: promisify app.getFileIcon() (#15742)
This commit is contained in:
parent
cfbea4a0e3
commit
3f15f51615
5 changed files with 72 additions and 68 deletions
|
@ -552,8 +552,29 @@ 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.
|
||||
On _Linux_ and _macOS_, icons depend on the application associated with file mime type.
|
||||
|
||||
**[Deprecated Soon](promisification.md)**
|
||||
|
||||
### `app.getFileIcon(path[, options])`
|
||||
|
||||
* `path` String
|
||||
* `options` Object (optional)
|
||||
* `size` String
|
||||
* `small` - 16x16
|
||||
* `normal` - 32x32
|
||||
* `large` - 48x48 on _Linux_, 32x32 on _Windows_, unsupported on _macOS_.
|
||||
|
||||
Returns `Promise<NativeImage>` - fulfilled with the app's icon, which is a [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.setPath(name, path)`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue