fileutils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDirs

func CreateDirs(path string, checkIfDirExist bool) error

CreateDirs creates dirs even if the parent dir doesn't exist. (It uses 750 permissions)

func DeleteDirs

func DeleteDirs(path string) error

DeleteDirs deletes dirs even if the parent dir doesn't exist.

func DeleteFile

func DeleteFile(path string) error

func DirExist

func DirExist(path string) bool

DirExist returns whether a directory exist

func FileExist

func FileExist(path string) bool

FileExist returns whether a file exist. TODO: Maybe refactor with DirExist

func PathStartsWithPathSymbol

func PathStartsWithPathSymbol(path string) bool

func ReadFile

func ReadFile(path string) ([]byte, error)

ReadFile read the file from filePath.

func StringContainsPathSymbols

func StringContainsPathSymbols(str string) bool

func WriteToFile

func WriteToFile(path string, content []byte) error

WriteToFile writes content to filePath. (It uses 600 permissions)

Types

This section is empty.

Jump to

Keyboard shortcuts

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