fs

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DirPerm = 0755
)

Variables

This section is empty.

Functions

func ArchiveFolder

func ArchiveFolder(gamePath, gameID string) (data []byte, err error)

func BinFromReader

func BinFromReader(r io.Reader) ([]byte, error)

func BinToWriter

func BinToWriter(w io.Writer, data []byte) error

func CopyFolder

func CopyFolder(oldPath, newPath string) error

func CreateAndProcess

func CreateAndProcess[T any](path string, in T, cb func(w io.Writer, in T) error) error

func CreateFolder

func CreateFolder(path string) error

func CreateFolderIfNotExist

func CreateFolderIfNotExist(path string) error

func GetFilenameWithoutExt

func GetFilenameWithoutExt(name string) string

func Int64ToString

func Int64ToString(in int64) string

func IsFileExist

func IsFileExist(path string) (isExist bool, err error)

func IsFolderExist

func IsFolderExist(path string) (isExist bool, err error)

func JsonFromReader

func JsonFromReader[T any](r io.Reader) (data *T, err error)

func JsonToWriter

func JsonToWriter[T any](w io.Writer, data T) error

func ListOfFiles

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

func ListOfFolders

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

func MoveFolder

func MoveFolder(oldPath, newPath string) error

func OpenAndProcess

func OpenAndProcess[T any](path string, cb func(r io.Reader) (T, error)) (res T, err error)

func PathToAbsolutePath

func PathToAbsolutePath(path string) string

func RemoveFile

func RemoveFile(path string) error

func RemoveFolder

func RemoveFolder(path string) error

func StringToInt64

func StringToInt64(in string) (int64, error)

func UnarchiveFolder

func UnarchiveFolder(data []byte, gameID string, cfg *config.Config) (resultGameID string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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