chrome-types 0.1.447 → 0.1.448
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_all.d.ts +8 -1231
- package/index.d.ts +7 -1230
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
// Generated on Sat Sep
|
|
18
|
-
// Built at
|
|
17
|
+
// Generated on Sat Sep 19 2026 22:23:18 GMT+0000 (Coordinated Universal Time)
|
|
18
|
+
// Built at 63e7f8905f1321aa5729bac838d4f95bdc72405d
|
|
19
19
|
|
|
20
20
|
// Includes MV3+ APIs only.
|
|
21
21
|
|
|
@@ -10040,1194 +10040,6 @@ declare namespace chrome {
|
|
|
10040
10040
|
}
|
|
10041
10041
|
}
|
|
10042
10042
|
|
|
10043
|
-
/**
|
|
10044
|
-
* Use the `chrome.fileSystemProvider` API to create file systems, that can be accessible from the file manager on Chrome OS.
|
|
10045
|
-
*
|
|
10046
|
-
* @chrome-permission fileSystemProvider
|
|
10047
|
-
* @chrome-platform chromeos
|
|
10048
|
-
*/
|
|
10049
|
-
export namespace fileSystemProvider {
|
|
10050
|
-
|
|
10051
|
-
/**
|
|
10052
|
-
* Error codes used by providing extensions in response to requests as well as in case of errors when calling methods of the API. For success, `"OK"` must be used.
|
|
10053
|
-
*/
|
|
10054
|
-
export type ProviderError = "OK" | "FAILED" | "IN_USE" | "EXISTS" | "NOT_FOUND" | "ACCESS_DENIED" | "TOO_MANY_OPENED" | "NO_MEMORY" | "NO_SPACE" | "NOT_A_DIRECTORY" | "INVALID_OPERATION" | "SECURITY" | "ABORT" | "NOT_A_FILE" | "NOT_EMPTY" | "INVALID_URL" | "IO";
|
|
10055
|
-
|
|
10056
|
-
/**
|
|
10057
|
-
* Mode of opening a file. Used by {@link onOpenFileRequested}.
|
|
10058
|
-
*/
|
|
10059
|
-
export type OpenFileMode = "READ" | "WRITE";
|
|
10060
|
-
|
|
10061
|
-
/**
|
|
10062
|
-
* Type of a change detected on the observed directory.
|
|
10063
|
-
*/
|
|
10064
|
-
export type ChangeType = "CHANGED" | "DELETED";
|
|
10065
|
-
|
|
10066
|
-
/**
|
|
10067
|
-
* List of common actions. `"SHARE"` is for sharing files with others. `"SAVE_FOR_OFFLINE"` for pinning (saving for offline access). `"OFFLINE_NOT_NECESSARY"` for notifying that the file doesn't need to be stored for offline access anymore. Used by {@link onGetActionsRequested} and {@link onExecuteActionRequested}.
|
|
10068
|
-
*
|
|
10069
|
-
* @since Chrome 45
|
|
10070
|
-
*/
|
|
10071
|
-
export type CommonActionId = "SAVE_FOR_OFFLINE" | "OFFLINE_NOT_NECESSARY" | "SHARE";
|
|
10072
|
-
|
|
10073
|
-
/**
|
|
10074
|
-
* @since Chrome 117
|
|
10075
|
-
*/
|
|
10076
|
-
export interface CloudIdentifier {
|
|
10077
|
-
|
|
10078
|
-
/**
|
|
10079
|
-
* Identifier for the cloud storage provider (e.g. 'drive.google.com').
|
|
10080
|
-
*/
|
|
10081
|
-
providerName: string;
|
|
10082
|
-
|
|
10083
|
-
/**
|
|
10084
|
-
* The provider's identifier for the given file/directory.
|
|
10085
|
-
*/
|
|
10086
|
-
id: string;
|
|
10087
|
-
}
|
|
10088
|
-
|
|
10089
|
-
/**
|
|
10090
|
-
* @since Chrome 125
|
|
10091
|
-
*/
|
|
10092
|
-
export interface CloudFileInfo {
|
|
10093
|
-
|
|
10094
|
-
/**
|
|
10095
|
-
* A tag that represents the version of the file.
|
|
10096
|
-
*/
|
|
10097
|
-
versionTag?: string;
|
|
10098
|
-
}
|
|
10099
|
-
|
|
10100
|
-
export interface EntryMetadata {
|
|
10101
|
-
|
|
10102
|
-
/**
|
|
10103
|
-
* True if it is a directory. Must be provided if requested in `options`.
|
|
10104
|
-
*/
|
|
10105
|
-
isDirectory?: boolean;
|
|
10106
|
-
|
|
10107
|
-
/**
|
|
10108
|
-
* Name of this entry (not full path name). Must not contain '/'. For root it must be empty. Must be provided if requested in `options`.
|
|
10109
|
-
*/
|
|
10110
|
-
name?: string;
|
|
10111
|
-
|
|
10112
|
-
/**
|
|
10113
|
-
* File size in bytes. Must be provided if requested in `options`.
|
|
10114
|
-
*/
|
|
10115
|
-
size?: number;
|
|
10116
|
-
|
|
10117
|
-
/**
|
|
10118
|
-
* The last modified time of this entry. Must be provided if requested in `options`.
|
|
10119
|
-
*/
|
|
10120
|
-
modificationTime?: Date;
|
|
10121
|
-
|
|
10122
|
-
/**
|
|
10123
|
-
* Mime type for the entry. Always optional, but should be provided if requested in `options`.
|
|
10124
|
-
*/
|
|
10125
|
-
mimeType?: string;
|
|
10126
|
-
|
|
10127
|
-
/**
|
|
10128
|
-
* Thumbnail image as a data URI in either PNG, JPEG or WEBP format, at most 32 KB in size. Optional, but can be provided only when explicitly requested by the {@link onGetMetadataRequested} event.
|
|
10129
|
-
*/
|
|
10130
|
-
thumbnail?: string;
|
|
10131
|
-
|
|
10132
|
-
/**
|
|
10133
|
-
* Cloud storage representation of this entry. Must be provided if requested in `options` and the file is backed by cloud storage. For local files not backed by cloud storage, it should be undefined when requested.
|
|
10134
|
-
*
|
|
10135
|
-
* @since Chrome 117
|
|
10136
|
-
*/
|
|
10137
|
-
cloudIdentifier?: CloudIdentifier;
|
|
10138
|
-
|
|
10139
|
-
/**
|
|
10140
|
-
* Information that identifies a specific file in the underlying cloud file system. Must be provided if requested in `options` and the file is backed by cloud storage.
|
|
10141
|
-
*
|
|
10142
|
-
* @since Chrome 125
|
|
10143
|
-
*/
|
|
10144
|
-
cloudFileInfo?: CloudFileInfo;
|
|
10145
|
-
}
|
|
10146
|
-
|
|
10147
|
-
export interface Watcher {
|
|
10148
|
-
|
|
10149
|
-
/**
|
|
10150
|
-
* The path of the entry being observed.
|
|
10151
|
-
*/
|
|
10152
|
-
entryPath: string;
|
|
10153
|
-
|
|
10154
|
-
/**
|
|
10155
|
-
* Whether watching should include all child entries recursively. It can be true for directories only.
|
|
10156
|
-
*/
|
|
10157
|
-
recursive: boolean;
|
|
10158
|
-
|
|
10159
|
-
/**
|
|
10160
|
-
* Tag used by the last notification for the watcher.
|
|
10161
|
-
*/
|
|
10162
|
-
lastTag?: string;
|
|
10163
|
-
}
|
|
10164
|
-
|
|
10165
|
-
export interface OpenedFile {
|
|
10166
|
-
|
|
10167
|
-
/**
|
|
10168
|
-
* A request ID to be be used by consecutive read/write and close requests.
|
|
10169
|
-
*/
|
|
10170
|
-
openRequestId: number;
|
|
10171
|
-
|
|
10172
|
-
/**
|
|
10173
|
-
* The path of the opened file.
|
|
10174
|
-
*/
|
|
10175
|
-
filePath: string;
|
|
10176
|
-
|
|
10177
|
-
/**
|
|
10178
|
-
* Whether the file was opened for reading or writing.
|
|
10179
|
-
*/
|
|
10180
|
-
mode: OpenFileMode;
|
|
10181
|
-
}
|
|
10182
|
-
|
|
10183
|
-
export interface FileSystemInfo {
|
|
10184
|
-
|
|
10185
|
-
/**
|
|
10186
|
-
* The identifier of the file system.
|
|
10187
|
-
*/
|
|
10188
|
-
fileSystemId: string;
|
|
10189
|
-
|
|
10190
|
-
/**
|
|
10191
|
-
* A human-readable name for the file system.
|
|
10192
|
-
*/
|
|
10193
|
-
displayName: string;
|
|
10194
|
-
|
|
10195
|
-
/**
|
|
10196
|
-
* Whether the file system supports operations which may change contents of the file system (such as creating, deleting or writing to files).
|
|
10197
|
-
*/
|
|
10198
|
-
writable: boolean;
|
|
10199
|
-
|
|
10200
|
-
/**
|
|
10201
|
-
* The maximum number of files that can be opened at once. If 0, then not limited.
|
|
10202
|
-
*/
|
|
10203
|
-
openedFilesLimit: number;
|
|
10204
|
-
|
|
10205
|
-
/**
|
|
10206
|
-
* List of currently opened files.
|
|
10207
|
-
*/
|
|
10208
|
-
openedFiles: OpenedFile[];
|
|
10209
|
-
|
|
10210
|
-
/**
|
|
10211
|
-
* Whether the file system supports the `tag` field for observing directories.
|
|
10212
|
-
*
|
|
10213
|
-
* @since Chrome 45
|
|
10214
|
-
*/
|
|
10215
|
-
supportsNotifyTag?: boolean;
|
|
10216
|
-
|
|
10217
|
-
/**
|
|
10218
|
-
* List of watchers.
|
|
10219
|
-
*
|
|
10220
|
-
* @since Chrome 45
|
|
10221
|
-
*/
|
|
10222
|
-
watchers: Watcher[];
|
|
10223
|
-
}
|
|
10224
|
-
|
|
10225
|
-
export interface MountOptions {
|
|
10226
|
-
|
|
10227
|
-
/**
|
|
10228
|
-
* The string indentifier of the file system. Must be unique per each extension.
|
|
10229
|
-
*/
|
|
10230
|
-
fileSystemId: string;
|
|
10231
|
-
|
|
10232
|
-
/**
|
|
10233
|
-
* A human-readable name for the file system.
|
|
10234
|
-
*/
|
|
10235
|
-
displayName: string;
|
|
10236
|
-
|
|
10237
|
-
/**
|
|
10238
|
-
* Whether the file system supports operations which may change contents of the file system (such as creating, deleting or writing to files).
|
|
10239
|
-
*/
|
|
10240
|
-
writable?: boolean;
|
|
10241
|
-
|
|
10242
|
-
/**
|
|
10243
|
-
* The maximum number of files that can be opened at once. If not specified, or 0, then not limited.
|
|
10244
|
-
*/
|
|
10245
|
-
openedFilesLimit?: number;
|
|
10246
|
-
|
|
10247
|
-
/**
|
|
10248
|
-
* Whether the file system supports the `tag` field for observed directories.
|
|
10249
|
-
*
|
|
10250
|
-
* @since Chrome 45
|
|
10251
|
-
*/
|
|
10252
|
-
supportsNotifyTag?: boolean;
|
|
10253
|
-
|
|
10254
|
-
/**
|
|
10255
|
-
* Whether the framework should resume the file system at the next sign-in session. True by default.
|
|
10256
|
-
*
|
|
10257
|
-
* @since Chrome 64
|
|
10258
|
-
*/
|
|
10259
|
-
persistent?: boolean;
|
|
10260
|
-
}
|
|
10261
|
-
|
|
10262
|
-
export interface UnmountOptions {
|
|
10263
|
-
|
|
10264
|
-
/**
|
|
10265
|
-
* The identifier of the file system to be unmounted.
|
|
10266
|
-
*/
|
|
10267
|
-
fileSystemId: string;
|
|
10268
|
-
}
|
|
10269
|
-
|
|
10270
|
-
export interface UnmountRequestedOptions {
|
|
10271
|
-
|
|
10272
|
-
/**
|
|
10273
|
-
* The identifier of the file system to be unmounted.
|
|
10274
|
-
*/
|
|
10275
|
-
fileSystemId: string;
|
|
10276
|
-
|
|
10277
|
-
/**
|
|
10278
|
-
* The unique identifier of this request.
|
|
10279
|
-
*/
|
|
10280
|
-
requestId: number;
|
|
10281
|
-
}
|
|
10282
|
-
|
|
10283
|
-
export interface GetMetadataRequestedOptions {
|
|
10284
|
-
|
|
10285
|
-
/**
|
|
10286
|
-
* The identifier of the file system related to this operation.
|
|
10287
|
-
*/
|
|
10288
|
-
fileSystemId: string;
|
|
10289
|
-
|
|
10290
|
-
/**
|
|
10291
|
-
* The unique identifier of this request.
|
|
10292
|
-
*/
|
|
10293
|
-
requestId: number;
|
|
10294
|
-
|
|
10295
|
-
/**
|
|
10296
|
-
* The path of the entry to fetch metadata about.
|
|
10297
|
-
*/
|
|
10298
|
-
entryPath: string;
|
|
10299
|
-
|
|
10300
|
-
/**
|
|
10301
|
-
* Set to `true` if `is_directory` value is requested.
|
|
10302
|
-
*
|
|
10303
|
-
* @since Chrome 49
|
|
10304
|
-
*/
|
|
10305
|
-
isDirectory: boolean;
|
|
10306
|
-
|
|
10307
|
-
/**
|
|
10308
|
-
* Set to `true` if `name` value is requested.
|
|
10309
|
-
*
|
|
10310
|
-
* @since Chrome 49
|
|
10311
|
-
*/
|
|
10312
|
-
name: boolean;
|
|
10313
|
-
|
|
10314
|
-
/**
|
|
10315
|
-
* Set to `true` if `size` value is requested.
|
|
10316
|
-
*
|
|
10317
|
-
* @since Chrome 49
|
|
10318
|
-
*/
|
|
10319
|
-
size: boolean;
|
|
10320
|
-
|
|
10321
|
-
/**
|
|
10322
|
-
* Set to `true` if `modificationTime` value is requested.
|
|
10323
|
-
*
|
|
10324
|
-
* @since Chrome 49
|
|
10325
|
-
*/
|
|
10326
|
-
modificationTime: boolean;
|
|
10327
|
-
|
|
10328
|
-
/**
|
|
10329
|
-
* Set to `true` if `mimeType` value is requested.
|
|
10330
|
-
*
|
|
10331
|
-
* @since Chrome 49
|
|
10332
|
-
*/
|
|
10333
|
-
mimeType: boolean;
|
|
10334
|
-
|
|
10335
|
-
/**
|
|
10336
|
-
* Set to `true` if `thumbnail` value is requested.
|
|
10337
|
-
*/
|
|
10338
|
-
thumbnail: boolean;
|
|
10339
|
-
|
|
10340
|
-
/**
|
|
10341
|
-
* Set to `true` if `cloudIdentifier` value is requested.
|
|
10342
|
-
*
|
|
10343
|
-
* @since Chrome 117
|
|
10344
|
-
*/
|
|
10345
|
-
cloudIdentifier: boolean;
|
|
10346
|
-
|
|
10347
|
-
/**
|
|
10348
|
-
* Set to `true` if `cloudFileInfo` value is requested.
|
|
10349
|
-
*
|
|
10350
|
-
* @since Chrome 125
|
|
10351
|
-
*/
|
|
10352
|
-
cloudFileInfo: boolean;
|
|
10353
|
-
}
|
|
10354
|
-
|
|
10355
|
-
/**
|
|
10356
|
-
* @since Chrome 45
|
|
10357
|
-
*/
|
|
10358
|
-
export interface GetActionsRequestedOptions {
|
|
10359
|
-
|
|
10360
|
-
/**
|
|
10361
|
-
* The identifier of the file system related to this operation.
|
|
10362
|
-
*/
|
|
10363
|
-
fileSystemId: string;
|
|
10364
|
-
|
|
10365
|
-
/**
|
|
10366
|
-
* The unique identifier of this request.
|
|
10367
|
-
*/
|
|
10368
|
-
requestId: number;
|
|
10369
|
-
|
|
10370
|
-
/**
|
|
10371
|
-
* List of paths of entries for the list of actions.
|
|
10372
|
-
*
|
|
10373
|
-
* @since Chrome 47
|
|
10374
|
-
*/
|
|
10375
|
-
entryPaths: string[];
|
|
10376
|
-
}
|
|
10377
|
-
|
|
10378
|
-
export interface ReadDirectoryRequestedOptions {
|
|
10379
|
-
|
|
10380
|
-
/**
|
|
10381
|
-
* The identifier of the file system related to this operation.
|
|
10382
|
-
*/
|
|
10383
|
-
fileSystemId: string;
|
|
10384
|
-
|
|
10385
|
-
/**
|
|
10386
|
-
* The unique identifier of this request.
|
|
10387
|
-
*/
|
|
10388
|
-
requestId: number;
|
|
10389
|
-
|
|
10390
|
-
/**
|
|
10391
|
-
* The path of the directory which contents are requested.
|
|
10392
|
-
*/
|
|
10393
|
-
directoryPath: string;
|
|
10394
|
-
|
|
10395
|
-
/**
|
|
10396
|
-
* Set to `true` if `is_directory` value is requested.
|
|
10397
|
-
*
|
|
10398
|
-
* @since Chrome 49
|
|
10399
|
-
*/
|
|
10400
|
-
isDirectory: boolean;
|
|
10401
|
-
|
|
10402
|
-
/**
|
|
10403
|
-
* Set to `true` if `name` value is requested.
|
|
10404
|
-
*
|
|
10405
|
-
* @since Chrome 49
|
|
10406
|
-
*/
|
|
10407
|
-
name: boolean;
|
|
10408
|
-
|
|
10409
|
-
/**
|
|
10410
|
-
* Set to `true` if `size` value is requested.
|
|
10411
|
-
*
|
|
10412
|
-
* @since Chrome 49
|
|
10413
|
-
*/
|
|
10414
|
-
size: boolean;
|
|
10415
|
-
|
|
10416
|
-
/**
|
|
10417
|
-
* Set to `true` if `modificationTime` value is requested.
|
|
10418
|
-
*
|
|
10419
|
-
* @since Chrome 49
|
|
10420
|
-
*/
|
|
10421
|
-
modificationTime: boolean;
|
|
10422
|
-
|
|
10423
|
-
/**
|
|
10424
|
-
* Set to `true` if `mimeType` value is requested.
|
|
10425
|
-
*
|
|
10426
|
-
* @since Chrome 49
|
|
10427
|
-
*/
|
|
10428
|
-
mimeType: boolean;
|
|
10429
|
-
|
|
10430
|
-
/**
|
|
10431
|
-
* Set to `true` if `thumbnail` value is requested.
|
|
10432
|
-
*
|
|
10433
|
-
* @since Chrome 49
|
|
10434
|
-
*/
|
|
10435
|
-
thumbnail: boolean;
|
|
10436
|
-
}
|
|
10437
|
-
|
|
10438
|
-
export interface OpenFileRequestedOptions {
|
|
10439
|
-
|
|
10440
|
-
/**
|
|
10441
|
-
* The identifier of the file system related to this operation.
|
|
10442
|
-
*/
|
|
10443
|
-
fileSystemId: string;
|
|
10444
|
-
|
|
10445
|
-
/**
|
|
10446
|
-
* A request ID which will be used by consecutive read/write and close requests.
|
|
10447
|
-
*/
|
|
10448
|
-
requestId: number;
|
|
10449
|
-
|
|
10450
|
-
/**
|
|
10451
|
-
* The path of the file to be opened.
|
|
10452
|
-
*/
|
|
10453
|
-
filePath: string;
|
|
10454
|
-
|
|
10455
|
-
/**
|
|
10456
|
-
* Whether the file will be used for reading or writing.
|
|
10457
|
-
*/
|
|
10458
|
-
mode: OpenFileMode;
|
|
10459
|
-
}
|
|
10460
|
-
|
|
10461
|
-
export interface CloseFileRequestedOptions {
|
|
10462
|
-
|
|
10463
|
-
/**
|
|
10464
|
-
* The identifier of the file system related to this operation.
|
|
10465
|
-
*/
|
|
10466
|
-
fileSystemId: string;
|
|
10467
|
-
|
|
10468
|
-
/**
|
|
10469
|
-
* The unique identifier of this request.
|
|
10470
|
-
*/
|
|
10471
|
-
requestId: number;
|
|
10472
|
-
|
|
10473
|
-
/**
|
|
10474
|
-
* A request ID used to open the file.
|
|
10475
|
-
*/
|
|
10476
|
-
openRequestId: number;
|
|
10477
|
-
}
|
|
10478
|
-
|
|
10479
|
-
export interface ReadFileRequestedOptions {
|
|
10480
|
-
|
|
10481
|
-
/**
|
|
10482
|
-
* The identifier of the file system related to this operation.
|
|
10483
|
-
*/
|
|
10484
|
-
fileSystemId: string;
|
|
10485
|
-
|
|
10486
|
-
/**
|
|
10487
|
-
* The unique identifier of this request.
|
|
10488
|
-
*/
|
|
10489
|
-
requestId: number;
|
|
10490
|
-
|
|
10491
|
-
/**
|
|
10492
|
-
* A request ID used to open the file.
|
|
10493
|
-
*/
|
|
10494
|
-
openRequestId: number;
|
|
10495
|
-
|
|
10496
|
-
/**
|
|
10497
|
-
* Position in the file (in bytes) to start reading from.
|
|
10498
|
-
*/
|
|
10499
|
-
offset: number;
|
|
10500
|
-
|
|
10501
|
-
/**
|
|
10502
|
-
* Number of bytes to be returned.
|
|
10503
|
-
*/
|
|
10504
|
-
length: number;
|
|
10505
|
-
}
|
|
10506
|
-
|
|
10507
|
-
export interface CreateDirectoryRequestedOptions {
|
|
10508
|
-
|
|
10509
|
-
/**
|
|
10510
|
-
* The identifier of the file system related to this operation.
|
|
10511
|
-
*/
|
|
10512
|
-
fileSystemId: string;
|
|
10513
|
-
|
|
10514
|
-
/**
|
|
10515
|
-
* The unique identifier of this request.
|
|
10516
|
-
*/
|
|
10517
|
-
requestId: number;
|
|
10518
|
-
|
|
10519
|
-
/**
|
|
10520
|
-
* The path of the directory to be created.
|
|
10521
|
-
*/
|
|
10522
|
-
directoryPath: string;
|
|
10523
|
-
|
|
10524
|
-
/**
|
|
10525
|
-
* Whether the operation is recursive (for directories only).
|
|
10526
|
-
*/
|
|
10527
|
-
recursive: boolean;
|
|
10528
|
-
}
|
|
10529
|
-
|
|
10530
|
-
export interface DeleteEntryRequestedOptions {
|
|
10531
|
-
|
|
10532
|
-
/**
|
|
10533
|
-
* The identifier of the file system related to this operation.
|
|
10534
|
-
*/
|
|
10535
|
-
fileSystemId: string;
|
|
10536
|
-
|
|
10537
|
-
/**
|
|
10538
|
-
* The unique identifier of this request.
|
|
10539
|
-
*/
|
|
10540
|
-
requestId: number;
|
|
10541
|
-
|
|
10542
|
-
/**
|
|
10543
|
-
* The path of the entry to be deleted.
|
|
10544
|
-
*/
|
|
10545
|
-
entryPath: string;
|
|
10546
|
-
|
|
10547
|
-
/**
|
|
10548
|
-
* Whether the operation is recursive (for directories only).
|
|
10549
|
-
*/
|
|
10550
|
-
recursive: boolean;
|
|
10551
|
-
}
|
|
10552
|
-
|
|
10553
|
-
export interface CreateFileRequestedOptions {
|
|
10554
|
-
|
|
10555
|
-
/**
|
|
10556
|
-
* The identifier of the file system related to this operation.
|
|
10557
|
-
*/
|
|
10558
|
-
fileSystemId: string;
|
|
10559
|
-
|
|
10560
|
-
/**
|
|
10561
|
-
* The unique identifier of this request.
|
|
10562
|
-
*/
|
|
10563
|
-
requestId: number;
|
|
10564
|
-
|
|
10565
|
-
/**
|
|
10566
|
-
* The path of the file to be created.
|
|
10567
|
-
*/
|
|
10568
|
-
filePath: string;
|
|
10569
|
-
}
|
|
10570
|
-
|
|
10571
|
-
export interface CopyEntryRequestedOptions {
|
|
10572
|
-
|
|
10573
|
-
/**
|
|
10574
|
-
* The identifier of the file system related to this operation.
|
|
10575
|
-
*/
|
|
10576
|
-
fileSystemId: string;
|
|
10577
|
-
|
|
10578
|
-
/**
|
|
10579
|
-
* The unique identifier of this request.
|
|
10580
|
-
*/
|
|
10581
|
-
requestId: number;
|
|
10582
|
-
|
|
10583
|
-
/**
|
|
10584
|
-
* The source path of the entry to be copied.
|
|
10585
|
-
*/
|
|
10586
|
-
sourcePath: string;
|
|
10587
|
-
|
|
10588
|
-
/**
|
|
10589
|
-
* The destination path for the copy operation.
|
|
10590
|
-
*/
|
|
10591
|
-
targetPath: string;
|
|
10592
|
-
}
|
|
10593
|
-
|
|
10594
|
-
export interface MoveEntryRequestedOptions {
|
|
10595
|
-
|
|
10596
|
-
/**
|
|
10597
|
-
* The identifier of the file system related to this operation.
|
|
10598
|
-
*/
|
|
10599
|
-
fileSystemId: string;
|
|
10600
|
-
|
|
10601
|
-
/**
|
|
10602
|
-
* The unique identifier of this request.
|
|
10603
|
-
*/
|
|
10604
|
-
requestId: number;
|
|
10605
|
-
|
|
10606
|
-
/**
|
|
10607
|
-
* The source path of the entry to be moved into a new place.
|
|
10608
|
-
*/
|
|
10609
|
-
sourcePath: string;
|
|
10610
|
-
|
|
10611
|
-
/**
|
|
10612
|
-
* The destination path for the copy operation.
|
|
10613
|
-
*/
|
|
10614
|
-
targetPath: string;
|
|
10615
|
-
}
|
|
10616
|
-
|
|
10617
|
-
export interface TruncateRequestedOptions {
|
|
10618
|
-
|
|
10619
|
-
/**
|
|
10620
|
-
* The identifier of the file system related to this operation.
|
|
10621
|
-
*/
|
|
10622
|
-
fileSystemId: string;
|
|
10623
|
-
|
|
10624
|
-
/**
|
|
10625
|
-
* The unique identifier of this request.
|
|
10626
|
-
*/
|
|
10627
|
-
requestId: number;
|
|
10628
|
-
|
|
10629
|
-
/**
|
|
10630
|
-
* The path of the file to be truncated.
|
|
10631
|
-
*/
|
|
10632
|
-
filePath: string;
|
|
10633
|
-
|
|
10634
|
-
/**
|
|
10635
|
-
* Number of bytes to be retained after the operation completes.
|
|
10636
|
-
*/
|
|
10637
|
-
length: number;
|
|
10638
|
-
}
|
|
10639
|
-
|
|
10640
|
-
export interface WriteFileRequestedOptions {
|
|
10641
|
-
|
|
10642
|
-
/**
|
|
10643
|
-
* The identifier of the file system related to this operation.
|
|
10644
|
-
*/
|
|
10645
|
-
fileSystemId: string;
|
|
10646
|
-
|
|
10647
|
-
/**
|
|
10648
|
-
* The unique identifier of this request.
|
|
10649
|
-
*/
|
|
10650
|
-
requestId: number;
|
|
10651
|
-
|
|
10652
|
-
/**
|
|
10653
|
-
* A request ID used to open the file.
|
|
10654
|
-
*/
|
|
10655
|
-
openRequestId: number;
|
|
10656
|
-
|
|
10657
|
-
/**
|
|
10658
|
-
* Position in the file (in bytes) to start writing the bytes from.
|
|
10659
|
-
*/
|
|
10660
|
-
offset: number;
|
|
10661
|
-
|
|
10662
|
-
/**
|
|
10663
|
-
* Buffer of bytes to be written to the file.
|
|
10664
|
-
*/
|
|
10665
|
-
data: ArrayBuffer;
|
|
10666
|
-
}
|
|
10667
|
-
|
|
10668
|
-
export interface AbortRequestedOptions {
|
|
10669
|
-
|
|
10670
|
-
/**
|
|
10671
|
-
* The identifier of the file system related to this operation.
|
|
10672
|
-
*/
|
|
10673
|
-
fileSystemId: string;
|
|
10674
|
-
|
|
10675
|
-
/**
|
|
10676
|
-
* The unique identifier of this request.
|
|
10677
|
-
*/
|
|
10678
|
-
requestId: number;
|
|
10679
|
-
|
|
10680
|
-
/**
|
|
10681
|
-
* An ID of the request to be aborted.
|
|
10682
|
-
*/
|
|
10683
|
-
operationRequestId: number;
|
|
10684
|
-
}
|
|
10685
|
-
|
|
10686
|
-
export interface AddWatcherRequestedOptions {
|
|
10687
|
-
|
|
10688
|
-
/**
|
|
10689
|
-
* The identifier of the file system related to this operation.
|
|
10690
|
-
*/
|
|
10691
|
-
fileSystemId: string;
|
|
10692
|
-
|
|
10693
|
-
/**
|
|
10694
|
-
* The unique identifier of this request.
|
|
10695
|
-
*/
|
|
10696
|
-
requestId: number;
|
|
10697
|
-
|
|
10698
|
-
/**
|
|
10699
|
-
* The path of the entry to be observed.
|
|
10700
|
-
*/
|
|
10701
|
-
entryPath: string;
|
|
10702
|
-
|
|
10703
|
-
/**
|
|
10704
|
-
* Whether observing should include all child entries recursively. It can be true for directories only.
|
|
10705
|
-
*/
|
|
10706
|
-
recursive: boolean;
|
|
10707
|
-
}
|
|
10708
|
-
|
|
10709
|
-
export interface RemoveWatcherRequestedOptions {
|
|
10710
|
-
|
|
10711
|
-
/**
|
|
10712
|
-
* The identifier of the file system related to this operation.
|
|
10713
|
-
*/
|
|
10714
|
-
fileSystemId: string;
|
|
10715
|
-
|
|
10716
|
-
/**
|
|
10717
|
-
* The unique identifier of this request.
|
|
10718
|
-
*/
|
|
10719
|
-
requestId: number;
|
|
10720
|
-
|
|
10721
|
-
/**
|
|
10722
|
-
* The path of the watched entry.
|
|
10723
|
-
*/
|
|
10724
|
-
entryPath: string;
|
|
10725
|
-
|
|
10726
|
-
/**
|
|
10727
|
-
* Mode of the watcher.
|
|
10728
|
-
*/
|
|
10729
|
-
recursive: boolean;
|
|
10730
|
-
}
|
|
10731
|
-
|
|
10732
|
-
/**
|
|
10733
|
-
* @since Chrome 45
|
|
10734
|
-
*/
|
|
10735
|
-
export interface Action {
|
|
10736
|
-
|
|
10737
|
-
/**
|
|
10738
|
-
* The identifier of the action. Any string or {@link CommonActionId} for common actions.
|
|
10739
|
-
*/
|
|
10740
|
-
id: string;
|
|
10741
|
-
|
|
10742
|
-
/**
|
|
10743
|
-
* The title of the action. It may be ignored for common actions.
|
|
10744
|
-
*/
|
|
10745
|
-
title?: string;
|
|
10746
|
-
}
|
|
10747
|
-
|
|
10748
|
-
/**
|
|
10749
|
-
* @since Chrome 45
|
|
10750
|
-
*/
|
|
10751
|
-
export interface ExecuteActionRequestedOptions {
|
|
10752
|
-
|
|
10753
|
-
/**
|
|
10754
|
-
* The identifier of the file system related to this operation.
|
|
10755
|
-
*/
|
|
10756
|
-
fileSystemId: string;
|
|
10757
|
-
|
|
10758
|
-
/**
|
|
10759
|
-
* The unique identifier of this request.
|
|
10760
|
-
*/
|
|
10761
|
-
requestId: number;
|
|
10762
|
-
|
|
10763
|
-
/**
|
|
10764
|
-
* The set of paths of the entries to be used for the action.
|
|
10765
|
-
*
|
|
10766
|
-
* @since Chrome 47
|
|
10767
|
-
*/
|
|
10768
|
-
entryPaths: string[];
|
|
10769
|
-
|
|
10770
|
-
/**
|
|
10771
|
-
* The identifier of the action to be executed.
|
|
10772
|
-
*/
|
|
10773
|
-
actionId: string;
|
|
10774
|
-
}
|
|
10775
|
-
|
|
10776
|
-
export interface Change {
|
|
10777
|
-
|
|
10778
|
-
/**
|
|
10779
|
-
* The path of the changed entry.
|
|
10780
|
-
*/
|
|
10781
|
-
entryPath: string;
|
|
10782
|
-
|
|
10783
|
-
/**
|
|
10784
|
-
* The type of the change which happened to the entry.
|
|
10785
|
-
*/
|
|
10786
|
-
changeType: ChangeType;
|
|
10787
|
-
|
|
10788
|
-
/**
|
|
10789
|
-
* Information relating to the file if backed by a cloud file system.
|
|
10790
|
-
*
|
|
10791
|
-
* @since Chrome 125
|
|
10792
|
-
*/
|
|
10793
|
-
cloudFileInfo?: CloudFileInfo;
|
|
10794
|
-
}
|
|
10795
|
-
|
|
10796
|
-
export interface NotifyOptions {
|
|
10797
|
-
|
|
10798
|
-
/**
|
|
10799
|
-
* The identifier of the file system related to this change.
|
|
10800
|
-
*/
|
|
10801
|
-
fileSystemId: string;
|
|
10802
|
-
|
|
10803
|
-
/**
|
|
10804
|
-
* The path of the observed entry.
|
|
10805
|
-
*/
|
|
10806
|
-
observedPath: string;
|
|
10807
|
-
|
|
10808
|
-
/**
|
|
10809
|
-
* Mode of the observed entry.
|
|
10810
|
-
*/
|
|
10811
|
-
recursive: boolean;
|
|
10812
|
-
|
|
10813
|
-
/**
|
|
10814
|
-
* The type of the change which happened to the observed entry. If it is DELETED, then the observed entry will be automatically removed from the list of observed entries.
|
|
10815
|
-
*/
|
|
10816
|
-
changeType: ChangeType;
|
|
10817
|
-
|
|
10818
|
-
/**
|
|
10819
|
-
* List of changes to entries within the observed directory (including the entry itself)
|
|
10820
|
-
*/
|
|
10821
|
-
changes?: Change[];
|
|
10822
|
-
|
|
10823
|
-
/**
|
|
10824
|
-
* Tag for the notification. Required if the file system was mounted with the `supportsNotifyTag` option. Note, that this flag is necessary to provide notifications about changes which changed even when the system was shutdown.
|
|
10825
|
-
*/
|
|
10826
|
-
tag?: string;
|
|
10827
|
-
}
|
|
10828
|
-
|
|
10829
|
-
/**
|
|
10830
|
-
* @since Chrome 44
|
|
10831
|
-
*/
|
|
10832
|
-
export interface ConfigureRequestedOptions {
|
|
10833
|
-
|
|
10834
|
-
/**
|
|
10835
|
-
* The identifier of the file system to be configured.
|
|
10836
|
-
*/
|
|
10837
|
-
fileSystemId: string;
|
|
10838
|
-
|
|
10839
|
-
/**
|
|
10840
|
-
* The unique identifier of this request.
|
|
10841
|
-
*/
|
|
10842
|
-
requestId: number;
|
|
10843
|
-
}
|
|
10844
|
-
|
|
10845
|
-
/**
|
|
10846
|
-
* Raised when unmounting for the file system with the `fileSystemId` identifier is requested. In the response, the {@link unmount} API method must be called together with `successCallback`. If unmounting is not possible (eg. due to a pending operation), then `errorCallback` must be called.
|
|
10847
|
-
*/
|
|
10848
|
-
export const onUnmountRequested: events.Event<(
|
|
10849
|
-
options: UnmountRequestedOptions,
|
|
10850
|
-
successCallback: () => void,
|
|
10851
|
-
errorCallback: (
|
|
10852
|
-
error: ProviderError,
|
|
10853
|
-
) => void,
|
|
10854
|
-
) => void>;
|
|
10855
|
-
|
|
10856
|
-
/**
|
|
10857
|
-
* Raised when metadata of a file or a directory at `entryPath` is requested. The metadata must be returned with the `successCallback` call. In case of an error, `errorCallback` must be called.
|
|
10858
|
-
*/
|
|
10859
|
-
export const onGetMetadataRequested: events.Event<(
|
|
10860
|
-
options: GetMetadataRequestedOptions,
|
|
10861
|
-
successCallback: (
|
|
10862
|
-
metadata: EntryMetadata,
|
|
10863
|
-
) => void,
|
|
10864
|
-
errorCallback: (
|
|
10865
|
-
error: ProviderError,
|
|
10866
|
-
) => void,
|
|
10867
|
-
) => void>;
|
|
10868
|
-
|
|
10869
|
-
/**
|
|
10870
|
-
* Raised when a list of actions for a set of files or directories at `entryPaths` is requested. All of the returned actions must be applicable to each entry. If there are no such actions, an empty array should be returned. The actions must be returned with the `successCallback` call. In case of an error, `errorCallback` must be called.
|
|
10871
|
-
*
|
|
10872
|
-
* @since Chrome 48
|
|
10873
|
-
*/
|
|
10874
|
-
export const onGetActionsRequested: events.Event<(
|
|
10875
|
-
options: GetActionsRequestedOptions,
|
|
10876
|
-
successCallback: (
|
|
10877
|
-
actions: Action[],
|
|
10878
|
-
) => void,
|
|
10879
|
-
errorCallback: (
|
|
10880
|
-
error: ProviderError,
|
|
10881
|
-
) => void,
|
|
10882
|
-
) => void>;
|
|
10883
|
-
|
|
10884
|
-
/**
|
|
10885
|
-
* Raised when contents of a directory at `directoryPath` are requested. The results must be returned in chunks by calling the `successCallback` several times. In case of an error, `errorCallback` must be called.
|
|
10886
|
-
*/
|
|
10887
|
-
export const onReadDirectoryRequested: events.Event<(
|
|
10888
|
-
options: ReadDirectoryRequestedOptions,
|
|
10889
|
-
successCallback: (
|
|
10890
|
-
entries: EntryMetadata[],
|
|
10891
|
-
hasMore: boolean,
|
|
10892
|
-
) => void,
|
|
10893
|
-
errorCallback: (
|
|
10894
|
-
error: ProviderError,
|
|
10895
|
-
) => void,
|
|
10896
|
-
) => void>;
|
|
10897
|
-
|
|
10898
|
-
/**
|
|
10899
|
-
* Raised when opening a file at `filePath` is requested. If the file does not exist, then the operation must fail. Maximum number of files opened at once can be specified with `MountOptions`.
|
|
10900
|
-
*/
|
|
10901
|
-
export const onOpenFileRequested: events.Event<(
|
|
10902
|
-
options: OpenFileRequestedOptions,
|
|
10903
|
-
successCallback: (
|
|
10904
|
-
/**
|
|
10905
|
-
* @since Chrome 125
|
|
10906
|
-
*/
|
|
10907
|
-
metadata?: EntryMetadata,
|
|
10908
|
-
) => void,
|
|
10909
|
-
errorCallback: (
|
|
10910
|
-
error: ProviderError,
|
|
10911
|
-
) => void,
|
|
10912
|
-
) => void>;
|
|
10913
|
-
|
|
10914
|
-
/**
|
|
10915
|
-
* Raised when opening a file previously opened with `openRequestId` is requested to be closed.
|
|
10916
|
-
*/
|
|
10917
|
-
export const onCloseFileRequested: events.Event<(
|
|
10918
|
-
options: CloseFileRequestedOptions,
|
|
10919
|
-
successCallback: () => void,
|
|
10920
|
-
errorCallback: (
|
|
10921
|
-
error: ProviderError,
|
|
10922
|
-
) => void,
|
|
10923
|
-
) => void>;
|
|
10924
|
-
|
|
10925
|
-
/**
|
|
10926
|
-
* Raised when reading contents of a file opened previously with `openRequestId` is requested. The results must be returned in chunks by calling `successCallback` several times. In case of an error, `errorCallback` must be called.
|
|
10927
|
-
*/
|
|
10928
|
-
export const onReadFileRequested: events.Event<(
|
|
10929
|
-
options: ReadFileRequestedOptions,
|
|
10930
|
-
successCallback: (
|
|
10931
|
-
data: ArrayBuffer,
|
|
10932
|
-
hasMore: boolean,
|
|
10933
|
-
) => void,
|
|
10934
|
-
errorCallback: (
|
|
10935
|
-
error: ProviderError,
|
|
10936
|
-
) => void,
|
|
10937
|
-
) => void>;
|
|
10938
|
-
|
|
10939
|
-
/**
|
|
10940
|
-
* Raised when creating a directory is requested. The operation must fail with the EXISTS error if the target directory already exists. If `recursive` is true, then all of the missing directories on the directory path must be created.
|
|
10941
|
-
*/
|
|
10942
|
-
export const onCreateDirectoryRequested: events.Event<(
|
|
10943
|
-
options: CreateDirectoryRequestedOptions,
|
|
10944
|
-
successCallback: () => void,
|
|
10945
|
-
errorCallback: (
|
|
10946
|
-
error: ProviderError,
|
|
10947
|
-
) => void,
|
|
10948
|
-
) => void>;
|
|
10949
|
-
|
|
10950
|
-
/**
|
|
10951
|
-
* Raised when deleting an entry is requested. If `recursive` is true, and the entry is a directory, then all of the entries inside must be recursively deleted as well.
|
|
10952
|
-
*/
|
|
10953
|
-
export const onDeleteEntryRequested: events.Event<(
|
|
10954
|
-
options: DeleteEntryRequestedOptions,
|
|
10955
|
-
successCallback: () => void,
|
|
10956
|
-
errorCallback: (
|
|
10957
|
-
error: ProviderError,
|
|
10958
|
-
) => void,
|
|
10959
|
-
) => void>;
|
|
10960
|
-
|
|
10961
|
-
/**
|
|
10962
|
-
* Raised when creating a file is requested. If the file already exists, then `errorCallback` must be called with the `"EXISTS"` error code.
|
|
10963
|
-
*/
|
|
10964
|
-
export const onCreateFileRequested: events.Event<(
|
|
10965
|
-
options: CreateFileRequestedOptions,
|
|
10966
|
-
successCallback: () => void,
|
|
10967
|
-
errorCallback: (
|
|
10968
|
-
error: ProviderError,
|
|
10969
|
-
) => void,
|
|
10970
|
-
) => void>;
|
|
10971
|
-
|
|
10972
|
-
/**
|
|
10973
|
-
* Raised when copying an entry (recursively if a directory) is requested. If an error occurs, then `errorCallback` must be called.
|
|
10974
|
-
*/
|
|
10975
|
-
export const onCopyEntryRequested: events.Event<(
|
|
10976
|
-
options: CopyEntryRequestedOptions,
|
|
10977
|
-
successCallback: () => void,
|
|
10978
|
-
errorCallback: (
|
|
10979
|
-
error: ProviderError,
|
|
10980
|
-
) => void,
|
|
10981
|
-
) => void>;
|
|
10982
|
-
|
|
10983
|
-
/**
|
|
10984
|
-
* Raised when moving an entry (recursively if a directory) is requested. If an error occurs, then `errorCallback` must be called.
|
|
10985
|
-
*/
|
|
10986
|
-
export const onMoveEntryRequested: events.Event<(
|
|
10987
|
-
options: MoveEntryRequestedOptions,
|
|
10988
|
-
successCallback: () => void,
|
|
10989
|
-
errorCallback: (
|
|
10990
|
-
error: ProviderError,
|
|
10991
|
-
) => void,
|
|
10992
|
-
) => void>;
|
|
10993
|
-
|
|
10994
|
-
/**
|
|
10995
|
-
* Raised when truncating a file to a desired length is requested. If an error occurs, then `errorCallback` must be called.
|
|
10996
|
-
*/
|
|
10997
|
-
export const onTruncateRequested: events.Event<(
|
|
10998
|
-
options: TruncateRequestedOptions,
|
|
10999
|
-
successCallback: () => void,
|
|
11000
|
-
errorCallback: (
|
|
11001
|
-
error: ProviderError,
|
|
11002
|
-
) => void,
|
|
11003
|
-
) => void>;
|
|
11004
|
-
|
|
11005
|
-
/**
|
|
11006
|
-
* Raised when writing contents to a file opened previously with `openRequestId` is requested.
|
|
11007
|
-
*/
|
|
11008
|
-
export const onWriteFileRequested: events.Event<(
|
|
11009
|
-
options: WriteFileRequestedOptions,
|
|
11010
|
-
successCallback: () => void,
|
|
11011
|
-
errorCallback: (
|
|
11012
|
-
error: ProviderError,
|
|
11013
|
-
) => void,
|
|
11014
|
-
) => void>;
|
|
11015
|
-
|
|
11016
|
-
/**
|
|
11017
|
-
* Raised when aborting an operation with `operationRequestId` is requested. The operation executed with `operationRequestId` must be immediately stopped and `successCallback` of this abort request executed. If aborting fails, then `errorCallback` must be called. Note, that callbacks of the aborted operation must not be called, as they will be ignored. Despite calling `errorCallback`, the request may be forcibly aborted.
|
|
11018
|
-
*/
|
|
11019
|
-
export const onAbortRequested: events.Event<(
|
|
11020
|
-
options: AbortRequestedOptions,
|
|
11021
|
-
successCallback: () => void,
|
|
11022
|
-
errorCallback: (
|
|
11023
|
-
error: ProviderError,
|
|
11024
|
-
) => void,
|
|
11025
|
-
) => void>;
|
|
11026
|
-
|
|
11027
|
-
/**
|
|
11028
|
-
* Raised when showing a configuration dialog for `fileSystemId` is requested. If it's handled, the `file_system_provider.configurable` manfiest option must be set to true.
|
|
11029
|
-
*
|
|
11030
|
-
* @since Chrome 44
|
|
11031
|
-
*/
|
|
11032
|
-
export const onConfigureRequested: events.Event<(
|
|
11033
|
-
options: ConfigureRequestedOptions,
|
|
11034
|
-
successCallback: () => void,
|
|
11035
|
-
errorCallback: (
|
|
11036
|
-
error: ProviderError,
|
|
11037
|
-
) => void,
|
|
11038
|
-
) => void>;
|
|
11039
|
-
|
|
11040
|
-
/**
|
|
11041
|
-
* Raised when showing a dialog for mounting a new file system is requested. If the extension/app is a file handler, then this event shouldn't be handled. Instead `app.runtime.onLaunched` should be handled in order to mount new file systems when a file is opened. For multiple mounts, the `file_system_provider.multiple_mounts` manifest option must be set to true.
|
|
11042
|
-
*
|
|
11043
|
-
* @since Chrome 44
|
|
11044
|
-
*/
|
|
11045
|
-
export const onMountRequested: events.Event<(
|
|
11046
|
-
successCallback: () => void,
|
|
11047
|
-
errorCallback: (
|
|
11048
|
-
error: ProviderError,
|
|
11049
|
-
) => void,
|
|
11050
|
-
) => void>;
|
|
11051
|
-
|
|
11052
|
-
/**
|
|
11053
|
-
* Raised when setting a new directory watcher is requested. If an error occurs, then `errorCallback` must be called.
|
|
11054
|
-
*
|
|
11055
|
-
* @since Chrome 45
|
|
11056
|
-
*/
|
|
11057
|
-
export const onAddWatcherRequested: events.Event<(
|
|
11058
|
-
options: AddWatcherRequestedOptions,
|
|
11059
|
-
successCallback: () => void,
|
|
11060
|
-
errorCallback: (
|
|
11061
|
-
error: ProviderError,
|
|
11062
|
-
) => void,
|
|
11063
|
-
) => void>;
|
|
11064
|
-
|
|
11065
|
-
/**
|
|
11066
|
-
* Raised when the watcher should be removed. If an error occurs, then `errorCallback` must be called.
|
|
11067
|
-
*
|
|
11068
|
-
* @since Chrome 45
|
|
11069
|
-
*/
|
|
11070
|
-
export const onRemoveWatcherRequested: events.Event<(
|
|
11071
|
-
options: RemoveWatcherRequestedOptions,
|
|
11072
|
-
successCallback: () => void,
|
|
11073
|
-
errorCallback: (
|
|
11074
|
-
error: ProviderError,
|
|
11075
|
-
) => void,
|
|
11076
|
-
) => void>;
|
|
11077
|
-
|
|
11078
|
-
/**
|
|
11079
|
-
* Raised when executing an action for a set of files or directories is\\ requested. After the action is completed, `successCallback` must be called. On error, `errorCallback` must be called.
|
|
11080
|
-
*
|
|
11081
|
-
* @since Chrome 48
|
|
11082
|
-
*/
|
|
11083
|
-
export const onExecuteActionRequested: events.Event<(
|
|
11084
|
-
options: ExecuteActionRequestedOptions,
|
|
11085
|
-
successCallback: () => void,
|
|
11086
|
-
errorCallback: (
|
|
11087
|
-
error: ProviderError,
|
|
11088
|
-
) => void,
|
|
11089
|
-
) => void>;
|
|
11090
|
-
|
|
11091
|
-
/**
|
|
11092
|
-
* Mounts a file system with the given `fileSystemId` and `displayName`. `displayName` will be shown in the left panel of the Files app. `displayName` can contain any characters including '/', but cannot be an empty string. `displayName` must be descriptive but doesn't have to be unique. The `fileSystemId` must not be an empty string.
|
|
11093
|
-
*
|
|
11094
|
-
* Depending on the type of the file system being mounted, the `source` option must be set appropriately.
|
|
11095
|
-
*
|
|
11096
|
-
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
11097
|
-
*
|
|
11098
|
-
* @chrome-returns-extra since Chrome 96
|
|
11099
|
-
* @returns A generic result callback to indicate success or failure.
|
|
11100
|
-
*/
|
|
11101
|
-
export function mount(
|
|
11102
|
-
|
|
11103
|
-
options: MountOptions,
|
|
11104
|
-
): Promise<void>;
|
|
11105
|
-
|
|
11106
|
-
/**
|
|
11107
|
-
* Mounts a file system with the given `fileSystemId` and `displayName`. `displayName` will be shown in the left panel of the Files app. `displayName` can contain any characters including '/', but cannot be an empty string. `displayName` must be descriptive but doesn't have to be unique. The `fileSystemId` must not be an empty string.
|
|
11108
|
-
*
|
|
11109
|
-
* Depending on the type of the file system being mounted, the `source` option must be set appropriately.
|
|
11110
|
-
*
|
|
11111
|
-
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
11112
|
-
*/
|
|
11113
|
-
export function mount(
|
|
11114
|
-
|
|
11115
|
-
options: MountOptions,
|
|
11116
|
-
|
|
11117
|
-
callback?: () => void,
|
|
11118
|
-
): void;
|
|
11119
|
-
|
|
11120
|
-
/**
|
|
11121
|
-
* Unmounts a file system with the given `fileSystemId`. It must be called after {@link onUnmountRequested} is invoked. Also, the providing extension can decide to perform unmounting if not requested (eg. in case of lost connection, or a file error).
|
|
11122
|
-
*
|
|
11123
|
-
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
11124
|
-
*
|
|
11125
|
-
* @chrome-returns-extra since Chrome 96
|
|
11126
|
-
* @returns A generic result callback to indicate success or failure.
|
|
11127
|
-
*/
|
|
11128
|
-
export function unmount(
|
|
11129
|
-
|
|
11130
|
-
options: UnmountOptions,
|
|
11131
|
-
): Promise<void>;
|
|
11132
|
-
|
|
11133
|
-
/**
|
|
11134
|
-
* Unmounts a file system with the given `fileSystemId`. It must be called after {@link onUnmountRequested} is invoked. Also, the providing extension can decide to perform unmounting if not requested (eg. in case of lost connection, or a file error).
|
|
11135
|
-
*
|
|
11136
|
-
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
11137
|
-
*/
|
|
11138
|
-
export function unmount(
|
|
11139
|
-
|
|
11140
|
-
options: UnmountOptions,
|
|
11141
|
-
|
|
11142
|
-
callback?: () => void,
|
|
11143
|
-
): void;
|
|
11144
|
-
|
|
11145
|
-
/**
|
|
11146
|
-
* Returns all file systems mounted by the extension.
|
|
11147
|
-
*
|
|
11148
|
-
* @chrome-returns-extra since Chrome 96
|
|
11149
|
-
* @returns Callback to receive the result of {@link getAll} function.
|
|
11150
|
-
*/
|
|
11151
|
-
export function getAll(): Promise<FileSystemInfo[]>;
|
|
11152
|
-
|
|
11153
|
-
/**
|
|
11154
|
-
* Returns all file systems mounted by the extension.
|
|
11155
|
-
*/
|
|
11156
|
-
export function getAll(
|
|
11157
|
-
|
|
11158
|
-
callback?: (
|
|
11159
|
-
fileSystems: FileSystemInfo[],
|
|
11160
|
-
) => void,
|
|
11161
|
-
): void;
|
|
11162
|
-
|
|
11163
|
-
/**
|
|
11164
|
-
* Returns information about a file system with the passed `fileSystemId`.
|
|
11165
|
-
*
|
|
11166
|
-
* @chrome-returns-extra since Chrome 96
|
|
11167
|
-
* @returns Callback to receive the result of {@link get} function.
|
|
11168
|
-
*/
|
|
11169
|
-
export function get(
|
|
11170
|
-
|
|
11171
|
-
fileSystemId: string,
|
|
11172
|
-
): Promise<FileSystemInfo>;
|
|
11173
|
-
|
|
11174
|
-
/**
|
|
11175
|
-
* Returns information about a file system with the passed `fileSystemId`.
|
|
11176
|
-
*/
|
|
11177
|
-
export function get(
|
|
11178
|
-
|
|
11179
|
-
fileSystemId: string,
|
|
11180
|
-
|
|
11181
|
-
callback?: (
|
|
11182
|
-
fileSystem: FileSystemInfo,
|
|
11183
|
-
) => void,
|
|
11184
|
-
): void;
|
|
11185
|
-
|
|
11186
|
-
/**
|
|
11187
|
-
* Notifies about changes in the watched directory at `observedPath` in `recursive` mode. If the file system is mounted with `supportsNotifyTag`, then `tag` must be provided, and all changes since the last notification always reported, even if the system was shutdown. The last tag can be obtained with {@link getAll}.
|
|
11188
|
-
*
|
|
11189
|
-
* To use, the `file_system_provider.notify` manifest option must be set to true.
|
|
11190
|
-
*
|
|
11191
|
-
* Value of `tag` can be any string which is unique per call, so it's possible to identify the last registered notification. Eg. if the providing extension starts after a reboot, and the last registered notification's tag is equal to "123", then it should call {@link notify} for all changes which happened since the change tagged as "123". It cannot be an empty string.
|
|
11192
|
-
*
|
|
11193
|
-
* Not all providers are able to provide a tag, but if the file system has a changelog, then the tag can be eg. a change number, or a revision number.
|
|
11194
|
-
*
|
|
11195
|
-
* Note that if a parent directory is removed, then all descendant entries are also removed, and if they are watched, then the API must be notified about the fact. Also, if a directory is renamed, then all descendant entries are in fact removed, as there is no entry under their original paths anymore.
|
|
11196
|
-
*
|
|
11197
|
-
* In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
|
|
11198
|
-
*
|
|
11199
|
-
* @chrome-returns-extra since Chrome 96
|
|
11200
|
-
* @returns A generic result callback to indicate success or failure.
|
|
11201
|
-
* @since Chrome 45
|
|
11202
|
-
*/
|
|
11203
|
-
export function notify(
|
|
11204
|
-
|
|
11205
|
-
options: NotifyOptions,
|
|
11206
|
-
): Promise<void>;
|
|
11207
|
-
|
|
11208
|
-
/**
|
|
11209
|
-
* Notifies about changes in the watched directory at `observedPath` in `recursive` mode. If the file system is mounted with `supportsNotifyTag`, then `tag` must be provided, and all changes since the last notification always reported, even if the system was shutdown. The last tag can be obtained with {@link getAll}.
|
|
11210
|
-
*
|
|
11211
|
-
* To use, the `file_system_provider.notify` manifest option must be set to true.
|
|
11212
|
-
*
|
|
11213
|
-
* Value of `tag` can be any string which is unique per call, so it's possible to identify the last registered notification. Eg. if the providing extension starts after a reboot, and the last registered notification's tag is equal to "123", then it should call {@link notify} for all changes which happened since the change tagged as "123". It cannot be an empty string.
|
|
11214
|
-
*
|
|
11215
|
-
* Not all providers are able to provide a tag, but if the file system has a changelog, then the tag can be eg. a change number, or a revision number.
|
|
11216
|
-
*
|
|
11217
|
-
* Note that if a parent directory is removed, then all descendant entries are also removed, and if they are watched, then the API must be notified about the fact. Also, if a directory is renamed, then all descendant entries are in fact removed, as there is no entry under their original paths anymore.
|
|
11218
|
-
*
|
|
11219
|
-
* In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
|
|
11220
|
-
*
|
|
11221
|
-
* @since Chrome 45
|
|
11222
|
-
*/
|
|
11223
|
-
export function notify(
|
|
11224
|
-
|
|
11225
|
-
options: NotifyOptions,
|
|
11226
|
-
|
|
11227
|
-
callback?: () => void,
|
|
11228
|
-
): void;
|
|
11229
|
-
}
|
|
11230
|
-
|
|
11231
10043
|
/**
|
|
11232
10044
|
* Use the `chrome.fontSettings` API to manage Chrome's font settings.
|
|
11233
10045
|
*
|
|
@@ -14992,43 +13804,6 @@ declare namespace chrome {
|
|
|
14992
13804
|
*/
|
|
14993
13805
|
startup_pages?: string[];
|
|
14994
13806
|
}
|
|
14995
|
-
|
|
14996
|
-
/**
|
|
14997
|
-
* For `"file"` the source is a file passed via `onLaunched` event. For `"device"` contents are fetched from an external device (eg. plugged via USB), without using `file_handlers`. Finally, for `"network"` source, contents should be fetched via network.
|
|
14998
|
-
*
|
|
14999
|
-
* @since Chrome 44
|
|
15000
|
-
*/
|
|
15001
|
-
export type FileSystemProviderSource = "file" | "device" | "network";
|
|
15002
|
-
|
|
15003
|
-
/**
|
|
15004
|
-
* Represents capabilities of a providing extension.
|
|
15005
|
-
*
|
|
15006
|
-
* @since Chrome 44
|
|
15007
|
-
*/
|
|
15008
|
-
export interface FileSystemProviderCapabilities {
|
|
15009
|
-
|
|
15010
|
-
/**
|
|
15011
|
-
* Whether configuring via `onConfigureRequested` is supported. By default: `false`.
|
|
15012
|
-
*/
|
|
15013
|
-
configurable?: boolean;
|
|
15014
|
-
|
|
15015
|
-
/**
|
|
15016
|
-
* Whether multiple (more than one) mounted file systems are supported. By default: `false`.
|
|
15017
|
-
*/
|
|
15018
|
-
multiple_mounts?: boolean;
|
|
15019
|
-
|
|
15020
|
-
/**
|
|
15021
|
-
* Whether setting watchers and notifying about changes is supported. By default: `false`.
|
|
15022
|
-
*
|
|
15023
|
-
* @since Chrome 45
|
|
15024
|
-
*/
|
|
15025
|
-
watchable?: boolean;
|
|
15026
|
-
|
|
15027
|
-
/**
|
|
15028
|
-
* Source of data for mounted file systems.
|
|
15029
|
-
*/
|
|
15030
|
-
source: FileSystemProviderSource;
|
|
15031
|
-
}
|
|
15032
13807
|
}
|
|
15033
13808
|
|
|
15034
13809
|
/**
|
|
@@ -20406,7 +19181,7 @@ declare namespace chrome {
|
|
|
20406
19181
|
export interface SocketProperties {
|
|
20407
19182
|
|
|
20408
19183
|
/**
|
|
20409
|
-
* Flag indicating if the socket is left open when the event page of the application is unloaded (see [Manage App Lifecycle](https://developer.chrome.com/docs/apps/app_lifecycle)). The default value is "false.
|
|
19184
|
+
* Flag indicating if the socket is left open when the event page of the application is unloaded (see [Manage App Lifecycle](https://developer.chrome.com/docs/apps/app_lifecycle)). The default value is "false". When the application is loaded, any sockets previously opened with persistent=true can be fetched with `getSockets`.
|
|
20410
19185
|
*/
|
|
20411
19186
|
persistent?: boolean;
|
|
20412
19187
|
|
|
@@ -20465,7 +19240,7 @@ declare namespace chrome {
|
|
|
20465
19240
|
name?: string;
|
|
20466
19241
|
|
|
20467
19242
|
/**
|
|
20468
|
-
* The size of the buffer used to receive data. If no buffer size has been specified
|
|
19243
|
+
* The size of the buffer used to receive data. If no buffer size has been specified explicitly, the value is not provided.
|
|
20469
19244
|
*/
|
|
20470
19245
|
bufferSize?: number;
|
|
20471
19246
|
|
|
@@ -20529,7 +19304,7 @@ declare namespace chrome {
|
|
|
20529
19304
|
) => void>;
|
|
20530
19305
|
|
|
20531
19306
|
/**
|
|
20532
|
-
* Event raised when a network error
|
|
19307
|
+
* Event raised when a network error occurred while the runtime was waiting for data on the socket address and port. Once this event is raised, the socket is paused and no more `onReceive` events will be raised for this socket until the socket is resumed.
|
|
20533
19308
|
*/
|
|
20534
19309
|
export const onReceiveError: events.Event<(
|
|
20535
19310
|
info: ReceiveErrorInfo,
|
|
@@ -20595,6 +19370,7 @@ declare namespace chrome {
|
|
|
20595
19370
|
/**
|
|
20596
19371
|
* Pauses or unpauses a socket. A paused socket is blocked from firing `onReceive` events.
|
|
20597
19372
|
*
|
|
19373
|
+
* @param socketId The socket ID.
|
|
20598
19374
|
* @param paused Flag to indicate whether to pause or unpause.
|
|
20599
19375
|
* @returns Called when the socket has been successfully paused or unpaused.
|
|
20600
19376
|
*/
|
|
@@ -20608,6 +19384,7 @@ declare namespace chrome {
|
|
|
20608
19384
|
/**
|
|
20609
19385
|
* Pauses or unpauses a socket. A paused socket is blocked from firing `onReceive` events.
|
|
20610
19386
|
*
|
|
19387
|
+
* @param socketId The socket ID.
|
|
20611
19388
|
* @param paused Flag to indicate whether to pause or unpause.
|
|
20612
19389
|
*/
|
|
20613
19390
|
export function setPaused(
|