os

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChtimesNow added in v0.0.23

func ChtimesNow(name string) error

Chtimes changes the access and modification times of the named file with Now, similar to the Unix utime() or utimes() functions.

The underlying filesystem may truncate or round the values to a less precise time unit. If there is an error, it will be of type *PathError.

func CreateAll added in v0.0.23

func CreateAll(path string) error

CreateAll creates or truncates the named file or dir. If the file already exists, it is truncated. If the file does not exist, it is created with mode 0666 (before umask). If the dir does not exist, it is created with mode 0666 (before umask).

func CreateAllIfNotExist added in v0.0.23

func CreateAllIfNotExist(path string) error

CreateAllIfNotExist creates the named file or dir. If the file does not exist, it is created with mode 0666 (before umask). If the dir does not exist, it is created with mode 0666 (before umask). If path is already a directory, CreateAllIfNotExist does nothing and returns nil.

func GetAbsBinDir

func GetAbsBinDir() (dir string, err error)

func PathExists

func PathExists(path string) (bool, error)

func TouchAll added in v0.0.23

func TouchAll(path string) error

TouchAll creates the named file or dir. If the file already exists, it is touched to now. If the file does not exist, it is created with mode 0666 (before umask). If the dir does not exist, it is created with mode 0666 (before umask).

Types

This section is empty.

Jump to

Keyboard shortcuts

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