extos

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package extos base tool

Package extos base tool

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Executable added in v0.1.7

func Executable() (dir, file string, err error)

Executable 和os.Executable() 一致,但是获取执行程序的所在路径和文件名

func FileCopy added in v0.0.3

func FileCopy(src, dest string) error

FileCopy copies file from source to target path.

func FileModTime added in v0.0.3

func FileModTime(file string) (int64, error)

FileModTime returns file modified time and possible error.

func FileMode added in v0.1.6

func FileMode(name string) (os.FileMode, error)

FileMode returns file mode and possible error.

func FileSize added in v0.0.3

func FileSize(file string) (int64, error)

FileSize returns file size in bytes and possible error.

func Filepaths added in v0.1.4

func Filepaths(root string) ([]string, error)

Filepaths returns all root dir (contain sub dir) file full path

func HasPermission added in v0.0.3

func HasPermission(name string) bool

HasPermission returns a boolean indicating whether that permission is allowed.

func IsDir added in v0.1.6

func IsDir(filePath string) bool

IsDir returns true if given path is a dir, or returns false when it's a file or does not exist.

func IsExist added in v0.0.3

func IsExist(paths string) bool

IsExist checks whether a file or directory exists. It returns false when the file or directory does not exist.

func IsFile added in v0.0.3

func IsFile(filePath string) bool

IsFile returns true if given path is a file, or returns false when it's a directory or does not exist.

func IsLinux added in v0.1.6

func IsLinux() bool

IsLinux 当前操作系统是否Linux.

func IsMac added in v0.1.6

func IsMac() bool

IsMac 当前操作系统是否Mac OS/X.

func IsMachineLittleEndian

func IsMachineLittleEndian() bool

IsMachineLittleEndian 判断系统大小端

func IsWindows added in v0.1.6

func IsWindows() bool

IsWindows 当前操作系统是否Windows.

func WriteFile added in v0.0.3

func WriteFile(filename string, data []byte) error

WriteFile writes data to a file named by filename. If the file does not exist, WriteFile creates it and its upper level paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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