ioHelpers

package
v1.2.26 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 15 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backup

func Backup(table, location string)

func Copy

func Copy(fileName string, fromPath string, toPath string) bool

The Copy function copies a file from one path to another and returns true if the copy was successful.

func CopyFile

func CopyFile(src, dst string) error

File copies a single file from src to dst

func DeleteFolder

func DeleteFolder(path string) error

func Dir

func Dir(path string) ([]string, error)

func Dump

func Dump(tableName string, where paths.FileSystemPath, action string, recordID string, yy any)

func Empty

func Empty(dir string) error

Empty clears the contents of a specified directory The function "Empty" deletes all files in a given directory.

func GetDBFileName

func GetDBFileName(name string) string

func GetFolders

func GetFolders(path string) ([]string, error)

func MkDir

func MkDir(path string) error

func MkdirAll

func MkdirAll(path string) error

func Read

func Read(fileName string, path string) (string, error)

The Read function reads the content of a file given its name and path, and returns the content as a string.

func Touch

func Touch(filename string) bool

Touch returns true if the specified file existing on the filesystem The Touch function takes a filename as input and returns a boolean value indicating whether the file was successfully touched.

func Write

func Write(fileName string, path string, content string) (bool, error)

The Write function writes content to a file specified by fileName and path, and returns a boolean indicating success and an error if any.

func WriteData

func WriteData(fileName string, path string, content string) int

The function `WriteData` writes the given content to a file with the specified name and path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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