Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

Window: requestFileSystem() method

Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.

The non-standardWindow methodrequestFileSystem() method is a Google Chrome-specificmethod which lets a website or app gain access to a sandboxed file system for its ownuse. The returnedFileSystem is then available for use with the otherfile system APIs.

Note:This method is prefixed withwebkit in all browsers that implement it.

Syntax

js
requestFileSystem(type, size, successCallback)requestFileSystem(type, size, successCallback, errorCallback)

Parameters

type

The type of storage to request. SpecifyWindow.TEMPORARY if it'sacceptable for the browser to delete the files at its own discretion, such as ifstorage space runs low, orWindow.PERSISTENT if you need the files toremain in place unless the user or the website or app explicitly permit it.Persistent storage requires that the user grant the site quota.

size

The amount of storage space you wish to have allocated for your app's use.

successCallback

A function which is invoked when the file system has been successfully obtained. Thecallback receives a single parameter: aFileSystem object representingthe file system the app has permission to use.

errorCallbackOptional

An optional parameter specifying a function which is called if an error occurs whileattempting to obtain the file system, or if the user denies permission to create oraccess the file system. The callback receives as input a single parameter: aDOMException object describing the error.

Return value

None (undefined).

Specifications

As this method was removed from theFile and Directory Entries API proposal, it has no official W3C or WHATWG specification. It is no longer on track to become a standard.

Browser compatibility

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp