gspath

package
v0.0.0-...-3631402 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

搜索目录管理. 可以添加搜索目录,按照添加的优先级进行文件检索,并在内部进行高效缓存处理。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SPath

type SPath struct {
	// contains filtered or unexported fields
}

文件目录搜索管理对象

func New

func New() *SPath

func (*SPath) Add

func (sp *SPath) Add(path string) error

添加搜索路径

func (*SPath) Search

func (sp *SPath) Search(name string) string

按照优先级搜索文件,返回搜索到的文件绝对路径

func (*SPath) Set

func (sp *SPath) Set(path string) error

设置搜索路径,只保留当前设置项,其他搜索路径被清空

func (*SPath) Size

func (sp *SPath) Size() int

当前的搜索路径数量

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL