Node represents a file in the file system, as a [core.Tree] node. The name of the node is the name of the file. Folders have children containing further nodes.
| 41 | // The name of the node is the name of the file. |
| 42 | // Folders have children containing further nodes. |
| 43 | type Node struct { //core:embedder |
| 44 | core.Tree |
| 45 | |
| 46 | // Filepath is the full path to this file. |
| 47 | Filepath core.Filename `edit:"-" set:"-" json:"-" xml:"-" copier:"-"` |
| 48 | |
| 49 | // Info is the full standard file info about this file. |
| 50 | Info fileinfo.FileInfo `edit:"-" set:"-" json:"-" xml:"-" copier:"-"` |
| 51 | |
| 52 | // Buffer is the file buffer for editing this file. |
| 53 | Buffer *texteditor.Buffer `edit:"-" set:"-" json:"-" xml:"-" copier:"-"` |
| 54 | |
| 55 | // FileRoot is the root [Tree] of the tree, which has global state. |
| 56 | FileRoot *Tree `edit:"-" set:"-" json:"-" xml:"-" copier:"-"` |
| 57 | |
| 58 | // DirRepo is the version control system repository for this directory, |
| 59 | // only non-nil if this is the highest-level directory in the tree under vcs control. |
| 60 | DirRepo vcs.Repo `edit:"-" set:"-" json:"-" xml:"-" copier:"-"` |
| 61 | |
| 62 | // repoFiles has the version control system repository file status, |
| 63 | // providing a much faster way to get file status, vs. the repo.Status |
| 64 | // call which is exceptionally slow. |
| 65 | repoFiles vcs.Files |
| 66 | } |
| 67 | |
| 68 | func (fn *Node) AsFileNode() *Node { |
| 69 | return fn |
nothing calls this directly
no outgoing calls
no test coverage detected