oss

package
v0.3.22 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: MIT Imports: 10 Imported by: 5

Documentation

Overview

Package oss 操作系统相关.

包括 Abs目录, Mod模块,

Index

Constants

View Source
const DefaultDirFileMod os.FileMode = 0o771
View Source
const DefaultFileMode os.FileMode = 0o664

Variables

View Source
var ErrNotDefined = errors.New("OS is not defined")

ErrNotDefined 系统不支持.

Functions

func Abs

func Abs(path string) (string, error)

func Exec added in v0.2.11

func Exec(name string, args ...string) error

Exec 执行命令.

func ExecOut added in v0.2.11

func ExecOut(name string, args ...string) (string, error)

ExecOut 获取执行结果.

func Exist added in v0.2.11

func Exist(paths ...string) bool

func GetMod

func GetMod(name string) *debug.Module

func GetModByInfo

func GetModByInfo(info *debug.BuildInfo, name string) *debug.Module

func IsDir added in v0.2.15

func IsDir(paths ...string) bool

func IsFile added in v0.2.15

func IsFile(paths ...string) bool

func MkdirParent added in v0.2.19

func MkdirParent(path string)

func Open added in v0.2.11

func Open(file string) error

Open 打开文件.

func Show added in v0.2.11

func Show(file string) error

Show 在目录中显示.

func SignalClose

func SignalClose(errorer Errorer, closers ...Closer) context.Context

Types

type Closer added in v0.1.5

type Closer interface {
	Close() error
}

type Errorer added in v0.1.5

type Errorer interface {
	Error(error)
}

type StateCode

type StateCode = int
const (
	Test StateCode = iota
	Play
	Run
	Build
)

func State

func State() StateCode

func StateByFile

func StateByFile(file string) StateCode

Jump to

Keyboard shortcuts

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