fileops

package
v0.0.0-...-9aa2fb4 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: Unlicense Imports: 9 Imported by: 12

Documentation

Index

Constants

View Source
const ALL_CHILDREN = !DIRECT_CHILDREN
View Source
const DIRECT_CHILDREN = true

Variables

View Source
var FoldersOnly = func(file string) bool {
	return IsFolder(file)
}

Functions

func Abs

func Abs(target string) string

func AppendStringToFile

func AppendStringToFile(path, text string)

func Copy

func Copy(from string, to string)

func CopyFolderContentToFolder

func CopyFolderContentToFolder(from string, to string, filter FileFilter, directChildren bool)

func Delete

func Delete(filename string)

func EngageDeleteSafeLock

func EngageDeleteSafeLock(safeLock bool)

func ExtensionIs

func ExtensionIs(file string, ext string) bool

func FileExists

func FileExists(filename string) bool

func IsFile

func IsFile(target string) bool

func IsFolder

func IsFolder(target string) bool

func ListFiles

func ListFiles(target string, filter FileFilter, directChildren bool) []string

func NameWithoutExtention

func NameWithoutExtention(file string) string

func Parent

func Parent(file string) string

func PathToArray

func PathToArray(path string) []string

func ReadFileToString

func ReadFileToString(file string) string

func SplitPath

func SplitPath(fullPath, prefixPath string) string

func WriteStringToFile

func WriteStringToFile(file, data string)

Types

type FileFilter

type FileFilter func(file string) bool

Jump to

Keyboard shortcuts

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