io

package
v0.0.0-...-bc5e03d Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: AFL-3.0, CC-BY-3.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFilesFinal

func CheckFilesFinal(files []string) bool

CheckFilesFinal batch to check wheathre final files is existed

func CheckFilesOverwrite

func CheckFilesOverwrite(files []string, overwrite bool) int

CheckFilesOverwrite check wheather to overwrite existing files

func CheckInputFiles

func CheckInputFiles(files []string) error

CheckInputFiles check input files

func CheckRenameFinal

func CheckRenameFinal(old string, new string) bool

CheckRenameFinal check final file wheather renamed

func CheckRenameOverwrite

func CheckRenameOverwrite(old string, new string, overwrite bool) int

CheckRenameOverwrite check wheather to rename existing files

func CopyFile

func CopyFile(dstFilePath string, srcFilePath string) (written int64, err error)

CopyFile copy file from srcFilePath to dstFilePath

func CreateDir

func CreateDir(name string) error

CreateDir create dir with os.MkdirAll

func CreateFile

func CreateFile(name string) error

CreateFile create file

func CreateFileParDir

func CreateFileParDir(name string) error

CreateFileParDir create parant dir of file

func FileSize

func FileSize(filename string) int64

FileSize get file size

func LinkFileToDir

func LinkFileToDir(oldname, newname string) error

LinkFileToDir create os.Symlink

func NewOutStream

func NewOutStream(outfn string, url string) *os.File

NewOutStream set stdout or outfn

func Open

func Open(name string) (*os.File, error)

Open connect the file using os.OpenFile (auto create if not exist the file)

func PathExists

func PathExists(name string) (bool, error)

PathExists check wheather file is existed

func ReadLines

func ReadLines(fn string) []string

ReadLines import a file as []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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