FileSystemEntry.name
The read-only name
property of
the FileSystemEntry
interface returns a USVString
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
A USVString
indicating the entry's name.
Examples
This example shows a function called isFileWithExtension()
which returns
true if the specified FileSystemEntry
is both a file and the file's name
ends with a given extension.
function isFileWithExtension(entry, extension) {
return (entry.isFile && entry.name.endsWith("." + extension));
}
Specifications
Specification |
---|
File and Directory Entries API # dom-filesystementry-name |
Browser compatibility
BCD tables only load in the browser