Table of Contents

Class FileSystemEntry

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The FileSystemEntry interface of the File and Directory Entries API represents a single entry in a file system. The entry can be a file or a directory (directories are represented by the FileSystemDirectoryEntry interface). It includes methods for working with files—including copying, moving, removing, and reading files—as well as information about a file it points to—including the file name and its path from the root to the entry.

[Value("FileSystemEntry")]
public class FileSystemEntry
Inheritance
FileSystemEntry
Derived
Inherited Members

Remarks

Constructors

FileSystemEntry()

public FileSystemEntry()

Properties

Filesystem

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

[Value("filesystem")]
public FileSystem Filesystem { get; }

Property Value

FileSystem

A FileSystem representing the file system on which the file or directory
described by the FileSystemEntry is located.

Remarks

FullPath

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.

[Value("fullPath")]
public string FullPath { get; }

Property Value

string

A string indicating the entry's full path.

Remarks

This can also be thought of as a path which is relative to the root directory, with a
"/" prepended to it to make it absolute.

-File and Directory Entries API
-FileSystemEntry

See also on MDN

IsDirectory

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.

[Value("isDirectory")]
public bool IsDirectory { get; }

Property Value

bool

A Boolean indicating whether or not the FileSystemEntry is a directory.

Remarks

You can also use IsFile to determine if the
entry is a file.

WARNING

You should not assume that any entry which isn't a directory is a file or vice versa.
There are other types of file descriptors on many operating systems. Be sure to use
both isDirectory and isFile as needed to ensure that the
entry is something you know how to work with.

-File and Directory Entries API
-FileSystemEntry
-IsFile
-FileSystemDirectoryEntry

See also on MDN

IsFile

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.

[Value("isFile")]
public bool IsFile { get; }

Property Value

bool

A Boolean indicating whether or not the FileSystemEntry is a file.

Remarks

You can also use IsDirectory to determine
if the entry is a directory.

WARNING

You should not assume that any entry which isn't a file is a directory or vice versa.
There are other types of file descriptors on many operating systems. Be sure to use
both isDirectory and isFile as needed to ensure that the
entry is something you know how to work with.

-File and Directory Entries API
-FileSystemEntry
-IsDirectory
-FileSystemFileEntry

See also on MDN

Name

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).

[Value("name")]
public string Name { get; }

Property Value

string

A string indicating the entry's name.

Remarks

Methods

GetParent(FileSystemEntryCallback, ErrorCallback)

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

[Value("getParent")]
public GlobalObject.Undefined GetParent(FileSystemEntryCallback successCallback = null, ErrorCallback errorCallback = null)

Parameters

successCallback FileSystemEntryCallback
errorCallback ErrorCallback

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks