[[Dataviewはノートのfrontmatterと本文からkeyが取得できる]]だけでなく、Dataviewはファイルの更新日やリンクなどからもkeyを取得できる。
**ファイル名に日付があると`file.day`が取得できる。**(yyyy-mm-dd or yyyymmdd)
→[Data Annotation - Dataview](https://blacksmithgu.github.io/obsidian-dataview/data-annotation/)
その他、以下のようなkeyを取得可能。
- file.day
- `file.name`: The file title (a string).
- `file.folder`: The path of the folder this file belongs to.
- `file.path`: The full file path (a string).
- `file.ext`: The extension of the file type; generally '.md' (a string).
- `file.link`: A link to the file (a link).
- `file.size`: The size (in bytes) of the file (a number).
- `file.ctime`: The date that the file was created (a date + time).
- `file.cday`: The date that the file was created (just a date).
- `file.mtime`: The date that the file was last modified (a date + time).
- `file.mday`: The date that the file was last modified (just a date).
- `file.tags`: An array of all unique tags in the note. Subtags are broken down by each level, so `#Tag/1/A` will be stored in the array as `[#Tag, #Tag/1, #Tag/1/A]`.
- `file.etags`: An array of all explicit tags in the note; unlike `file.tags`, does not include subtags.
- `file.inlinks`: An array of all incoming links to this file.
- `file.outlinks`: An array of all outgoing links from this file.
- `file.aliases`: An array of all aliases for the note.
- `file.tasks`: An array of all tasks (I.e., `- [ ] blah blah blah`) in this file.
- `file.lists`: An array of all list elements in the file (including tasks); these elements are effectively tasks and can be rendered in task views.
- `file.frontmatter`: Contains the raw values of all frontmatter; mainly useful for checking raw frontmatter values or for dynamically listing frontmatter keys.
また、スタープラグインを使うとスターの有無からも取得できる。
## テスト
構文:'file.name: \`= this.file.name\`'
結果:file.name: `= this.file.name`
構文:file.folder: \`= this.file.folder\`
結果:file.folder: `= this.file.folder`
構文:file.path: \`= this.file.path\`.
結果:file.path: `= this.file.path`.
構文:file.ext: \`= this.file.ext\`
結果:file.ext: `= this.file.ext`
構文:file.link: \`= this.file.link\`
結果:file.link: `= this.file.link`.
構文:file.frontmatter: \`= this.file.frontmatter\`
結果:file.frontmatter: `= this.file.frontmatter`.