file_system_provider.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. // This file was generated by:
  5. // tools/json_schema_compiler/compiler.py.
  6. // NOTE: The format of types has changed. 'FooType' is now
  7. // 'chrome.fileSystemProvider.FooType'.
  8. // Please run the closure compiler before committing changes.
  9. // See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
  10. /** @fileoverview Externs generated from namespace: fileSystemProvider */
  11. /** @const */
  12. chrome.fileSystemProvider = {};
  13. /**
  14. * @enum {string}
  15. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-ProviderError
  16. */
  17. chrome.fileSystemProvider.ProviderError = {
  18. OK: 'OK',
  19. FAILED: 'FAILED',
  20. IN_USE: 'IN_USE',
  21. EXISTS: 'EXISTS',
  22. NOT_FOUND: 'NOT_FOUND',
  23. ACCESS_DENIED: 'ACCESS_DENIED',
  24. TOO_MANY_OPENED: 'TOO_MANY_OPENED',
  25. NO_MEMORY: 'NO_MEMORY',
  26. NO_SPACE: 'NO_SPACE',
  27. NOT_A_DIRECTORY: 'NOT_A_DIRECTORY',
  28. INVALID_OPERATION: 'INVALID_OPERATION',
  29. SECURITY: 'SECURITY',
  30. ABORT: 'ABORT',
  31. NOT_A_FILE: 'NOT_A_FILE',
  32. NOT_EMPTY: 'NOT_EMPTY',
  33. INVALID_URL: 'INVALID_URL',
  34. IO: 'IO',
  35. };
  36. /**
  37. * @enum {string}
  38. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-OpenFileMode
  39. */
  40. chrome.fileSystemProvider.OpenFileMode = {
  41. READ: 'READ',
  42. WRITE: 'WRITE',
  43. };
  44. /**
  45. * @enum {string}
  46. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-ChangeType
  47. */
  48. chrome.fileSystemProvider.ChangeType = {
  49. CHANGED: 'CHANGED',
  50. DELETED: 'DELETED',
  51. };
  52. /**
  53. * @enum {string}
  54. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-CommonActionId
  55. */
  56. chrome.fileSystemProvider.CommonActionId = {
  57. SAVE_FOR_OFFLINE: 'SAVE_FOR_OFFLINE',
  58. OFFLINE_NOT_NECESSARY: 'OFFLINE_NOT_NECESSARY',
  59. SHARE: 'SHARE',
  60. };
  61. /**
  62. * @typedef {{
  63. * isDirectory: (boolean|undefined),
  64. * name: (string|undefined),
  65. * size: (number|undefined),
  66. * modificationTime: (Date|undefined),
  67. * mimeType: (string|undefined),
  68. * thumbnail: (string|undefined)
  69. * }}
  70. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-EntryMetadata
  71. */
  72. chrome.fileSystemProvider.EntryMetadata;
  73. /**
  74. * @typedef {{
  75. * entryPath: string,
  76. * recursive: boolean,
  77. * lastTag: (string|undefined)
  78. * }}
  79. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-Watcher
  80. */
  81. chrome.fileSystemProvider.Watcher;
  82. /**
  83. * @typedef {{
  84. * openRequestId: number,
  85. * filePath: string,
  86. * mode: !chrome.fileSystemProvider.OpenFileMode
  87. * }}
  88. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-OpenedFile
  89. */
  90. chrome.fileSystemProvider.OpenedFile;
  91. /**
  92. * @typedef {{
  93. * fileSystemId: string,
  94. * displayName: string,
  95. * writable: boolean,
  96. * openedFilesLimit: number,
  97. * openedFiles: !Array<!chrome.fileSystemProvider.OpenedFile>,
  98. * supportsNotifyTag: (boolean|undefined),
  99. * watchers: !Array<!chrome.fileSystemProvider.Watcher>
  100. * }}
  101. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-FileSystemInfo
  102. */
  103. chrome.fileSystemProvider.FileSystemInfo;
  104. /**
  105. * @typedef {{
  106. * fileSystemId: string,
  107. * displayName: string,
  108. * writable: (boolean|undefined),
  109. * openedFilesLimit: (number|undefined),
  110. * supportsNotifyTag: (boolean|undefined),
  111. * persistent: (boolean|undefined)
  112. * }}
  113. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-MountOptions
  114. */
  115. chrome.fileSystemProvider.MountOptions;
  116. /**
  117. * @typedef {{
  118. * fileSystemId: string
  119. * }}
  120. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-UnmountOptions
  121. */
  122. chrome.fileSystemProvider.UnmountOptions;
  123. /**
  124. * @typedef {{
  125. * fileSystemId: string,
  126. * requestId: number
  127. * }}
  128. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-UnmountRequestedOptions
  129. */
  130. chrome.fileSystemProvider.UnmountRequestedOptions;
  131. /**
  132. * @typedef {{
  133. * fileSystemId: string,
  134. * requestId: number,
  135. * entryPath: string,
  136. * isDirectory: boolean,
  137. * name: boolean,
  138. * size: boolean,
  139. * modificationTime: boolean,
  140. * mimeType: boolean,
  141. * thumbnail: boolean
  142. * }}
  143. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-GetMetadataRequestedOptions
  144. */
  145. chrome.fileSystemProvider.GetMetadataRequestedOptions;
  146. /**
  147. * @typedef {{
  148. * fileSystemId: string,
  149. * requestId: number,
  150. * entryPaths: !Array<string>
  151. * }}
  152. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-GetActionsRequestedOptions
  153. */
  154. chrome.fileSystemProvider.GetActionsRequestedOptions;
  155. /**
  156. * @typedef {{
  157. * fileSystemId: string,
  158. * requestId: number,
  159. * directoryPath: string,
  160. * isDirectory: boolean,
  161. * name: boolean,
  162. * size: boolean,
  163. * modificationTime: boolean,
  164. * mimeType: boolean,
  165. * thumbnail: boolean
  166. * }}
  167. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-ReadDirectoryRequestedOptions
  168. */
  169. chrome.fileSystemProvider.ReadDirectoryRequestedOptions;
  170. /**
  171. * @typedef {{
  172. * fileSystemId: string,
  173. * requestId: number,
  174. * filePath: string,
  175. * mode: !chrome.fileSystemProvider.OpenFileMode
  176. * }}
  177. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-OpenFileRequestedOptions
  178. */
  179. chrome.fileSystemProvider.OpenFileRequestedOptions;
  180. /**
  181. * @typedef {{
  182. * fileSystemId: string,
  183. * requestId: number,
  184. * openRequestId: number
  185. * }}
  186. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-CloseFileRequestedOptions
  187. */
  188. chrome.fileSystemProvider.CloseFileRequestedOptions;
  189. /**
  190. * @typedef {{
  191. * fileSystemId: string,
  192. * requestId: number,
  193. * openRequestId: number,
  194. * offset: number,
  195. * length: number
  196. * }}
  197. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-ReadFileRequestedOptions
  198. */
  199. chrome.fileSystemProvider.ReadFileRequestedOptions;
  200. /**
  201. * @typedef {{
  202. * fileSystemId: string,
  203. * requestId: number,
  204. * directoryPath: string,
  205. * recursive: boolean
  206. * }}
  207. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-CreateDirectoryRequestedOptions
  208. */
  209. chrome.fileSystemProvider.CreateDirectoryRequestedOptions;
  210. /**
  211. * @typedef {{
  212. * fileSystemId: string,
  213. * requestId: number,
  214. * entryPath: string,
  215. * recursive: boolean
  216. * }}
  217. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-DeleteEntryRequestedOptions
  218. */
  219. chrome.fileSystemProvider.DeleteEntryRequestedOptions;
  220. /**
  221. * @typedef {{
  222. * fileSystemId: string,
  223. * requestId: number,
  224. * filePath: string
  225. * }}
  226. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-CreateFileRequestedOptions
  227. */
  228. chrome.fileSystemProvider.CreateFileRequestedOptions;
  229. /**
  230. * @typedef {{
  231. * fileSystemId: string,
  232. * requestId: number,
  233. * sourcePath: string,
  234. * targetPath: string
  235. * }}
  236. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-CopyEntryRequestedOptions
  237. */
  238. chrome.fileSystemProvider.CopyEntryRequestedOptions;
  239. /**
  240. * @typedef {{
  241. * fileSystemId: string,
  242. * requestId: number,
  243. * sourcePath: string,
  244. * targetPath: string
  245. * }}
  246. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-MoveEntryRequestedOptions
  247. */
  248. chrome.fileSystemProvider.MoveEntryRequestedOptions;
  249. /**
  250. * @typedef {{
  251. * fileSystemId: string,
  252. * requestId: number,
  253. * filePath: string,
  254. * length: number
  255. * }}
  256. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-TruncateRequestedOptions
  257. */
  258. chrome.fileSystemProvider.TruncateRequestedOptions;
  259. /**
  260. * @typedef {{
  261. * fileSystemId: string,
  262. * requestId: number,
  263. * openRequestId: number,
  264. * offset: number,
  265. * data: ArrayBuffer
  266. * }}
  267. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-WriteFileRequestedOptions
  268. */
  269. chrome.fileSystemProvider.WriteFileRequestedOptions;
  270. /**
  271. * @typedef {{
  272. * fileSystemId: string,
  273. * requestId: number,
  274. * operationRequestId: number
  275. * }}
  276. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-AbortRequestedOptions
  277. */
  278. chrome.fileSystemProvider.AbortRequestedOptions;
  279. /**
  280. * @typedef {{
  281. * fileSystemId: string,
  282. * requestId: number,
  283. * entryPath: string,
  284. * recursive: boolean
  285. * }}
  286. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-AddWatcherRequestedOptions
  287. */
  288. chrome.fileSystemProvider.AddWatcherRequestedOptions;
  289. /**
  290. * @typedef {{
  291. * fileSystemId: string,
  292. * requestId: number,
  293. * entryPath: string,
  294. * recursive: boolean
  295. * }}
  296. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-RemoveWatcherRequestedOptions
  297. */
  298. chrome.fileSystemProvider.RemoveWatcherRequestedOptions;
  299. /**
  300. * @typedef {{
  301. * id: string,
  302. * title: (string|undefined)
  303. * }}
  304. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-Action
  305. */
  306. chrome.fileSystemProvider.Action;
  307. /**
  308. * @typedef {{
  309. * fileSystemId: string,
  310. * requestId: number,
  311. * entryPaths: !Array<string>,
  312. * actionId: string
  313. * }}
  314. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-ExecuteActionRequestedOptions
  315. */
  316. chrome.fileSystemProvider.ExecuteActionRequestedOptions;
  317. /**
  318. * @typedef {{
  319. * entryPath: string,
  320. * changeType: !chrome.fileSystemProvider.ChangeType
  321. * }}
  322. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-Change
  323. */
  324. chrome.fileSystemProvider.Change;
  325. /**
  326. * @typedef {{
  327. * fileSystemId: string,
  328. * observedPath: string,
  329. * recursive: boolean,
  330. * changeType: !chrome.fileSystemProvider.ChangeType,
  331. * changes: (!Array<!chrome.fileSystemProvider.Change>|undefined),
  332. * tag: (string|undefined)
  333. * }}
  334. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-NotifyOptions
  335. */
  336. chrome.fileSystemProvider.NotifyOptions;
  337. /**
  338. * @typedef {{
  339. * fileSystemId: string,
  340. * requestId: number
  341. * }}
  342. * @see https://developer.chrome.com/extensions/fileSystemProvider#type-ConfigureRequestedOptions
  343. */
  344. chrome.fileSystemProvider.ConfigureRequestedOptions;
  345. /**
  346. * <p>Mounts a file system with the given <code>fileSystemId</code> and
  347. * <code>displayName</code>. <code>displayName</code> will be shown in the left
  348. * panel of the Files app. <code>displayName</code> can contain any characters
  349. * including '/', but cannot be an empty string. <code>displayName</code> must
  350. * be descriptive but doesn't have to be unique. The <code>fileSystemId</code>
  351. * must not be an empty string.</p><p>Depending on the type of the file system
  352. * being mounted, the <code>source</code> option must be set
  353. * appropriately.</p><p>In case of an error, $(ref:runtime.lastError) will be
  354. * set with a corresponding error code.</p>
  355. * @param {!chrome.fileSystemProvider.MountOptions} options
  356. * @param {function(): void=} callback A generic result callback to indicate
  357. * success or failure.
  358. * @see https://developer.chrome.com/extensions/fileSystemProvider#method-mount
  359. */
  360. chrome.fileSystemProvider.mount = function(options, callback) {};
  361. /**
  362. * <p>Unmounts a file system with the given <code>fileSystemId</code>. It must
  363. * be called after $(ref:onUnmountRequested) is invoked. Also, the providing
  364. * extension can decide to perform unmounting if not requested (eg. in case of
  365. * lost connection, or a file error).</p><p>In case of an error,
  366. * $(ref:runtime.lastError) will be set with a corresponding error code.</p>
  367. * @param {!chrome.fileSystemProvider.UnmountOptions} options
  368. * @param {function(): void=} callback A generic result callback to indicate
  369. * success or failure.
  370. * @see https://developer.chrome.com/extensions/fileSystemProvider#method-unmount
  371. */
  372. chrome.fileSystemProvider.unmount = function(options, callback) {};
  373. /**
  374. * Returns all file systems mounted by the extension.
  375. * @param {function(!Array<!chrome.fileSystemProvider.FileSystemInfo>): void}
  376. * callback Callback to receive the result of $(ref:getAll) function.
  377. * @see https://developer.chrome.com/extensions/fileSystemProvider#method-getAll
  378. */
  379. chrome.fileSystemProvider.getAll = function(callback) {};
  380. /**
  381. * Returns information about a file system with the passed
  382. * <code>fileSystemId</code>.
  383. * @param {string} fileSystemId
  384. * @param {function(!chrome.fileSystemProvider.FileSystemInfo): void} callback
  385. * Callback to receive the result of $(ref:get) function.
  386. * @see https://developer.chrome.com/extensions/fileSystemProvider#method-get
  387. */
  388. chrome.fileSystemProvider.get = function(fileSystemId, callback) {};
  389. /**
  390. * <p>Notifies about changes in the watched directory at
  391. * <code>observedPath</code> in <code>recursive</code> mode. If the file system
  392. * is mounted with <code>supportsNofityTag</code>, then <code>tag</code> must be
  393. * provided, and all changes since the last notification always reported, even
  394. * if the system was shutdown. The last tag can be obtained with
  395. * $(ref:getAll).</p><p>To use, the <code>file_system_provider.notify</code>
  396. * manifest option must be set to true.</p><p>Value of <code>tag</code> can be
  397. * any string which is unique per call, so it's possible to identify the last
  398. * registered notification. Eg. if the providing extension starts after a
  399. * reboot, and the last registered notification's tag is equal to "123", then it
  400. * should call $(ref:notify) for all changes which happened since the change
  401. * tagged as "123". It cannot be an empty string.</p><p>Not all providers are
  402. * able to provide a tag, but if the file system has a changelog, then the tag
  403. * can be eg. a change number, or a revision number.</p><p>Note that if a parent
  404. * directory is removed, then all descendant entries are also removed, and if
  405. * they are watched, then the API must be notified about the fact. Also, if a
  406. * directory is renamed, then all descendant entries are in fact removed, as
  407. * there is no entry under their original paths anymore.</p><p>In case of an
  408. * error, $(ref:runtime.lastError) will be set will a corresponding error
  409. * code.</p>
  410. * @param {!chrome.fileSystemProvider.NotifyOptions} options
  411. * @param {function(): void=} callback A generic result callback to indicate
  412. * success or failure.
  413. * @see https://developer.chrome.com/extensions/fileSystemProvider#method-notify
  414. */
  415. chrome.fileSystemProvider.notify = function(options, callback) {};
  416. /**
  417. * Raised when unmounting for the file system with the <code>fileSystemId</code>
  418. * identifier is requested. In the response, the $(ref:unmount) API method must
  419. * be called together with <code>successCallback</code>. If unmounting is not
  420. * possible (eg. due to a pending operation), then <code>errorCallback</code>
  421. * must be called.
  422. * @type {!ChromeEvent}
  423. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onUnmountRequested
  424. */
  425. chrome.fileSystemProvider.onUnmountRequested;
  426. /**
  427. * Raised when metadata of a file or a directory at <code>entryPath</code> is
  428. * requested. The metadata must be returned with the
  429. * <code>successCallback</code> call. In case of an error,
  430. * <code>errorCallback</code> must be called.
  431. * @type {!ChromeEvent}
  432. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onGetMetadataRequested
  433. */
  434. chrome.fileSystemProvider.onGetMetadataRequested;
  435. /**
  436. * Raised when a list of actions for a set of files or directories at
  437. * <code>entryPaths</code> is requested. All of the returned actions must be
  438. * applicable to each entry. If there are no such actions, an empty array should
  439. * be returned. The actions must be returned with the
  440. * <code>successCallback</code> call. In case of an error,
  441. * <code>errorCallback</code> must be called.
  442. * @type {!ChromeEvent}
  443. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onGetActionsRequested
  444. */
  445. chrome.fileSystemProvider.onGetActionsRequested;
  446. /**
  447. * Raised when contents of a directory at <code>directoryPath</code> are
  448. * requested. The results must be returned in chunks by calling the
  449. * <code>successCallback</code> several times. In case of an error,
  450. * <code>errorCallback</code> must be called.
  451. * @type {!ChromeEvent}
  452. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onReadDirectoryRequested
  453. */
  454. chrome.fileSystemProvider.onReadDirectoryRequested;
  455. /**
  456. * Raised when opening a file at <code>filePath</code> is requested. If the file
  457. * does not exist, then the operation must fail. Maximum number of files opened
  458. * at once can be specified with <code>MountOptions</code>.
  459. * @type {!ChromeEvent}
  460. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onOpenFileRequested
  461. */
  462. chrome.fileSystemProvider.onOpenFileRequested;
  463. /**
  464. * Raised when opening a file previously opened with <code>openRequestId</code>
  465. * is requested to be closed.
  466. * @type {!ChromeEvent}
  467. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onCloseFileRequested
  468. */
  469. chrome.fileSystemProvider.onCloseFileRequested;
  470. /**
  471. * Raised when reading contents of a file opened previously with
  472. * <code>openRequestId</code> is requested. The results must be returned in
  473. * chunks by calling <code>successCallback</code> several times. In case of an
  474. * error, <code>errorCallback</code> must be called.
  475. * @type {!ChromeEvent}
  476. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onReadFileRequested
  477. */
  478. chrome.fileSystemProvider.onReadFileRequested;
  479. /**
  480. * Raised when creating a directory is requested. The operation must fail with
  481. * the EXISTS error if the target directory already exists. If
  482. * <code>recursive</code> is true, then all of the missing directories on the
  483. * directory path must be created.
  484. * @type {!ChromeEvent}
  485. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onCreateDirectoryRequested
  486. */
  487. chrome.fileSystemProvider.onCreateDirectoryRequested;
  488. /**
  489. * Raised when deleting an entry is requested. If <code>recursive</code> is
  490. * true, and the entry is a directory, then all of the entries inside must be
  491. * recursively deleted as well.
  492. * @type {!ChromeEvent}
  493. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onDeleteEntryRequested
  494. */
  495. chrome.fileSystemProvider.onDeleteEntryRequested;
  496. /**
  497. * Raised when creating a file is requested. If the file already exists, then
  498. * <code>errorCallback</code> must be called with the <code>"EXISTS"</code>
  499. * error code.
  500. * @type {!ChromeEvent}
  501. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onCreateFileRequested
  502. */
  503. chrome.fileSystemProvider.onCreateFileRequested;
  504. /**
  505. * Raised when copying an entry (recursively if a directory) is requested. If an
  506. * error occurs, then <code>errorCallback</code> must be called.
  507. * @type {!ChromeEvent}
  508. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onCopyEntryRequested
  509. */
  510. chrome.fileSystemProvider.onCopyEntryRequested;
  511. /**
  512. * Raised when moving an entry (recursively if a directory) is requested. If an
  513. * error occurs, then <code>errorCallback</code> must be called.
  514. * @type {!ChromeEvent}
  515. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onMoveEntryRequested
  516. */
  517. chrome.fileSystemProvider.onMoveEntryRequested;
  518. /**
  519. * Raised when truncating a file to a desired length is requested. If an error
  520. * occurs, then <code>errorCallback</code> must be called.
  521. * @type {!ChromeEvent}
  522. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onTruncateRequested
  523. */
  524. chrome.fileSystemProvider.onTruncateRequested;
  525. /**
  526. * Raised when writing contents to a file opened previously with
  527. * <code>openRequestId</code> is requested.
  528. * @type {!ChromeEvent}
  529. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onWriteFileRequested
  530. */
  531. chrome.fileSystemProvider.onWriteFileRequested;
  532. /**
  533. * Raised when aborting an operation with <code>operationRequestId</code> is
  534. * requested. The operation executed with <code>operationRequestId</code> must
  535. * be immediately stopped and <code>successCallback</code> of this abort request
  536. * executed. If aborting fails, then <code>errorCallback</code> must be called.
  537. * Note, that callbacks of the aborted operation must not be called, as they
  538. * will be ignored. Despite calling <code>errorCallback</code>, the request may
  539. * be forcibly aborted.
  540. * @type {!ChromeEvent}
  541. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onAbortRequested
  542. */
  543. chrome.fileSystemProvider.onAbortRequested;
  544. /**
  545. * Raised when showing a configuration dialog for <code>fileSystemId</code> is
  546. * requested. If it's handled, the
  547. * <code>file_system_provider.configurable</code> manfiest option must be set to
  548. * true.
  549. * @type {!ChromeEvent}
  550. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onConfigureRequested
  551. */
  552. chrome.fileSystemProvider.onConfigureRequested;
  553. /**
  554. * Raised when showing a dialog for mounting a new file system is requested. If
  555. * the extension/app is a file handler, then this event shouldn't be handled.
  556. * Instead <code>app.runtime.onLaunched</code> should be handled in order to
  557. * mount new file systems when a file is opened. For multiple mounts, the
  558. * <code>file_system_provider.multiple_mounts</code> manifest option must be set
  559. * to true.
  560. * @type {!ChromeEvent}
  561. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onMountRequested
  562. */
  563. chrome.fileSystemProvider.onMountRequested;
  564. /**
  565. * Raised when setting a new directory watcher is requested. If an error occurs,
  566. * then <code>errorCallback</code> must be called.
  567. * @type {!ChromeEvent}
  568. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onAddWatcherRequested
  569. */
  570. chrome.fileSystemProvider.onAddWatcherRequested;
  571. /**
  572. * Raised when the watcher should be removed. If an error occurs, then
  573. * <code>errorCallback</code> must be called.
  574. * @type {!ChromeEvent}
  575. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onRemoveWatcherRequested
  576. */
  577. chrome.fileSystemProvider.onRemoveWatcherRequested;
  578. /**
  579. * Raised when executing an action for a set of files or directories is\
  580. * requested. After the action is completed, <code>successCallback</code> must
  581. * be called. On error, <code>errorCallback</code> must be called.
  582. * @type {!ChromeEvent}
  583. * @see https://developer.chrome.com/extensions/fileSystemProvider#event-onExecuteActionRequested
  584. */
  585. chrome.fileSystemProvider.onExecuteActionRequested;