Documentation
¶
Index ¶
- Constants
- Variables
- func ExecutableName() string
- func GetVariable(key string) string
- func IsNotExist(err error) bool
- func PathExists(path string) bool
- func PathExtension(path string) string
- func ReadFile(path string) (string, error)
- func Remove(name string) error
- func SetVariable(key, value string) error
- func UnsetVariable(key string) error
- func WriteFile(name string, data string, perm FileMode) error
- type FileMode
- type FileSystem
- type SystemFS
Constants ¶
View Source
const ModeAppend = os.ModeAppend
ModeAppend will append to an existing file.
Variables ¶
View Source
var Args = os.Args
Args is an alias for os.Args.
View Source
var Exit = os.Exit
Exit is just an alias to os.Exit.
Module for fx.
Functions ¶
func IsNotExist ¶ added in v1.386.0
IsNotExist if the error is os.ErrNotExist.
func PathExists ¶ added in v1.386.0
PathExists for the path provided.
func PathExtension ¶ added in v1.420.0
PathExtension of the specified path.
func SetVariable ¶ added in v1.421.0
SetVariable of value by key.
Types ¶
type FileSystem ¶ added in v1.375.0
type FileSystem interface { // ReadFile for the path provided. ReadFile(path string) (string, error) // WriteFile writes data to name. WriteFile(name string, data string, perm FileMode) error // PathExists for the path provided. PathExists(path string) bool // IsNotExist whether the error is os.ErrNotExist. IsNotExist(err error) bool }
FileSystem borrows concepts from io/fs.
type SystemFS ¶ added in v1.421.0
type SystemFS struct{}
SystemFS uses the underlying os.
func (*SystemFS) IsNotExist ¶ added in v1.421.0
IsNotExist for os.
func (*SystemFS) PathExists ¶ added in v1.421.0
PathExists for os.
Click to show internal directories.
Click to hide internal directories.