Skip to main content

FileSystemDirectoryEntry

The FileSystemDirectoryEntry interface of the File and Directory Entries API represents a directory in a file system. It provides methods which make it possible to access and manipulate the files in a directory, as well as to access the entries within the directory.

MDN Reference

Extends

Methods

createReader()

createReader(): FileSystemDirectoryReader;

The FileSystemDirectoryEntry interface's method createReader() returns a FileSystemDirectoryReader object which can be used to read the entries in the directory.

MDN Reference

Returns

FileSystemDirectoryReader


getDirectory()

getDirectory(
path?,
options?,
successCallback?,
errorCallback?
): void;

The FileSystemDirectoryEntry interface's method getDirectory() returns a FileSystemDirectoryEntry object corresponding to a directory contained somewhere within the directory subtree rooted at the directory on which it's called.

MDN Reference

Parameters

ParameterType
path?string | null
options?FileSystemFlags
successCallback?FileSystemEntryCallback
errorCallback?ErrorCallback

Returns

void


getFile()

getFile(
path?,
options?,
successCallback?,
errorCallback?
): void;

The FileSystemDirectoryEntry interface's method getFile() returns a FileSystemFileEntry object corresponding to a file contained somewhere within the directory subtree rooted at the directory on which it's called.

MDN Reference

Parameters

ParameterType
path?string | null
options?FileSystemFlags
successCallback?FileSystemEntryCallback
errorCallback?ErrorCallback

Returns

void


getParent()

getParent(successCallback?, errorCallback?): void;

The FileSystemEntry interface's method getParent() obtains a FileSystemDirectoryEntry.

MDN Reference

Parameters

ParameterType
successCallback?FileSystemEntryCallback
errorCallback?ErrorCallback

Returns

void

Inherited from

FileSystemEntry.getParent

Properties

filesystem

readonly filesystem: FileSystem;

The read-only filesystem property of the FileSystemEntry interface contains a FileSystem object that represents the file system on which the entry resides.

MDN Reference

Inherited from

FileSystemEntry.filesystem


fullPath

readonly fullPath: string;

The read-only fullPath property of the FileSystemEntry interface returns a string specifying the full, absolute path from the file system's root to the file represented by the entry.

MDN Reference

Inherited from

FileSystemEntry.fullPath


isDirectory

readonly isDirectory: boolean;

The read-only isDirectory property of the FileSystemEntry interface is true if the entry represents a directory (meaning it's a FileSystemDirectoryEntry) and false if it's not.

MDN Reference

Inherited from

FileSystemEntry.isDirectory


isFile

readonly isFile: boolean;

The read-only isFile property of the FileSystemEntry interface is true if the entry represents a file (meaning it's a FileSystemFileEntry) and false if it's not.

MDN Reference

Inherited from

FileSystemEntry.isFile


name

readonly name: string;

The read-only name property of the FileSystemEntry interface returns a string specifying the entry's name; this is the entry within its parent directory (the last component of the path as indicated by the fullPath property).

MDN Reference

Inherited from

FileSystemEntry.name