FileSystemEntry: name プロパティ
name
は FileSystemEntry
インターフェイスの読み取り専用プロパティで、この項目の名前を指定する文字列を返します。これは、親ディレクトリー内の項目(fullPath
プロパティが示すパスの最後の部品)です。
値
項目の名前を示す文字列。
例
この例では isFileWithExtension()
という関数を示しています。この関数は、指定した FileSystemEntry
がファイルであり、かつそのファイル名が指定された拡張子で終わっている場合に true を返します。
js
function isFileWithExtension(entry, extension) {
return entry.isFile && entry.name.endsWith(`.${extension}`);
}
仕様書
Specification |
---|
File and Directory Entries API # dom-filesystementry-name |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.