Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

FileSystem

The File and Directory Entries API interfaceFileSystem is used to represent a file system. These objects can be obtained from thefilesystem property on any file system entry. Some browsers offer additional APIs to create and manage file systems, such as Chrome'srequestFileSystem() method.

This interface will not grant you access to the users' filesystem. Instead, you will have a "virtual drive" within the browser sandbox if you want to gain access to the users' file system, you need to invoke the user, for example by installing a Chrome extension. The relevant Chrome API can be foundin the Chrome developer docs.

Basic concepts

There are two ways to get access to aFileSystem object:

  1. You can directly ask for one representing a sandboxed file system created just for your web app directly by callingwindow.requestFileSystem(). If that call is successful, it executes a callback handler, which receives as a parameter aFileSystem object describing the file system.
  2. You can get it from a file system entry object, through itsfilesystem property.

Instance properties

FileSystem.nameRead only

A string representing the file system's name. This name is unique among the entire list of exposed file systems.

FileSystem.rootRead only

AFileSystemDirectoryEntry object which represents the file system's root directory. Through this object, you can gain access to all files and directories in the file system.

Specifications

Specification
File and Directory Entries API
# api-domfilesystem

Browser compatibility

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp