Documentation
¶
Index ¶
- func Search(root string, name string, indexFiles ...string) (filePath string, isDir bool)
- func SearchWithCache(root string, name string, indexFiles ...string) (filePath string, isDir bool)
- type TPath
- func (sp *TPath) Add(path string) (realPath string, err error)
- func (sp *TPath) AllPaths() []string
- func (sp *TPath) Paths() []string
- func (sp *TPath) Remove(path string)
- func (sp *TPath) Search(name string, indexFiles ...string) (filePath string, isDir bool)
- func (sp *TPath) Set(path string) (realPath string, err error)
- func (sp *TPath) Size() int
- type TPathCacheItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TPath ¶
type TPath struct {
// contains filtered or unexported fields
}
文件目录搜索管理对象
func (*TPath) Search ¶
给定的name只是相对文件路径,找不到该文件时,返回空字符串; 当给定indexFiles时,如果name是一个目录,那么会进一步检索其下对应的indexFiles文件是否存在,存在则返回indexFile绝对路径; 否则返回name目录绝对路径。
type TPathCacheItem ¶
type TPathCacheItem struct {
// contains filtered or unexported fields
}
文件搜索缓存项
Click to show internal directories.
Click to hide internal directories.