package fileutil
import "git.wntrmute.dev/kyle/goutils/fileutil"
Package fileutil contains common file functions.
Index ¶
- Constants
- func Access(path string, mode int) error
- func DirectoryDoesExist(path string) bool
- func FileDoesExist(path string) bool
- func ValidateSymlink(symlink, topLevel string) bool
Constants ¶
const ( // AccessExists checks whether the file exists. AccessExists = unix.F_OK // AccessRead checks whether the user has read permissions on // the file. AccessRead = unix.R_OK // AccessWrite checks whether the user has write permissions // on the file. AccessWrite = unix.W_OK // AccessExec checks whether the user has executable // permissions on the file. AccessExec = unix.X_OK )
Functions ¶
func Access ¶
Access returns a boolean indicating whether the mode being checked for is valid.
func DirectoryDoesExist ¶
DirectoryDoesExist returns true if the file exists.
func FileDoesExist ¶
FileDoesExist returns true if the file exists.
func ValidateSymlink ¶
ValidateSymlink checks to make sure a symlink exists in some top-level directory.
Source Files ¶
fileutil.go symlinks.go
- Version
- v1.7.7 (latest)
- Published
- Jun 15, 2024
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 4 days ago –
Tools for package owners.