paths

package
v0.0.0-...-af25eba Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDirectories

func EnsureDirectories(log *logrus.Logger, dirs ...string) (err error)

EnsureDirectories 確保傳入資料夾路徑存在, 不存在會主動建立之

func EnsureDirectory

func EnsureDirectory(log *logrus.Logger, dir string) error

EnsureDirectory 確保傳入資料夾路徑存在, 不存在會主動建立之

func IsExistDirectory

func IsExistDirectory(dir string) bool

IsExistDirectory 判斷傳入的資料夾路徑存在, 且是目錄

func IsExistFile

func IsExistFile(dir string) bool

IsExistFile 判斷傳入的資料夾路徑存在, 且是檔案

Types

type Home

type Home string

Home 代表此 app 寫 filesystem 的根目錄路徑

func (Home) Cache

func (h Home) Cache() string

Cache 回傳 cache 的目錄路徑

func (Home) CacheArchives

func (h Home) CacheArchives() string

CacheArchives 回傳 cache/archives 的目錄路徑

func (Home) CachePlugins

func (h Home) CachePlugins() string

CachePlugins 回傳 cache/plugins 的目錄路徑

func (Home) CacheRepositoryFile

func (h Home) CacheRepositoryFile() string

CacheRepositoryFile 回傳 cache/plugins/repository.yaml 的檔案路徑

func (Home) Config

func (h Home) Config() string

Config 回傳 config 的目錄路徑

func (Home) ConfigFile

func (h Home) ConfigFile() string

ConfigFile 回傳 config/configs.yaml 的檔案路徑

func (Home) ContainsAnySpace

func (h Home) ContainsAnySpace() bool

ContainsAnySpace 回傳 Home 根目錄是否包含空白

func (Home) Mounts

func (h Home) Mounts() string

Mounts 回傳 mounts 的目錄路徑

func (Home) Plugins

func (h Home) Plugins() string

Plugins 回傳 plugins 的目錄路徑

func (Home) String

func (h Home) String() string

Jump to

Keyboard shortcuts

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