files

package
v0.0.0-...-c18a219 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exist

func Exist(filePath string) bool

Exist returns a boolean indicating whether a file or directory exists.

func IsDir

func IsDir(filePath string) bool

IsDir returns a boolean indicating whether a path is directory.

func NotExist

func NotExist(filePath string) bool

NotExist returns a boolean indicating whether a file or directory does not exist.

func Open

func Open(filename string) (*os.File, error)

Open opens the named file with flag os.O_WRONLY|os.O_APPEND|os.O_CREATE and perm 0666. If the file is not exists, it will be created automatically.

func OpenFile

func OpenFile(filename string, flag int, perm os.FileMode) (*os.File, error)

OpenFile opens the named file with specified flag (O_RDONLY etc.) and perm (0666 etc.) if applicable. If the file is not exists, it will be created automatically. If successful, methods on the returned File can be used for I/O. If there is an error, it will be of type *PathError.

Types

This section is empty.

Jump to

Keyboard shortcuts

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