fileOps

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: MIT Imports: 13 Imported by: 0

README

fileOps

  • CSV functions such as opening, reading, writing
  • Filename splitting, file renaming

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CsvOpenRead

func CsvOpenRead(fname string) (*csv.Reader, *os.File)

func CsvOpenWriteBuf

func CsvOpenWriteBuf() *csv.Writer

func CsvOpenWriteFile

func CsvOpenWriteFile(fname string) (*csv.Writer, *os.File)

func OverwriteCsv

func OverwriteCsv(fname string, data []string) (bool, string)

OverwriteCsv a CSV file with new data; also create a backup file with date and .bak extension

func RemoveOldBackups added in v0.5.0

func RemoveOldBackups(rawName string, max int)

func RenameFile

func RenameFile(oldPath, newPath string) bool

RenameFile rename a file; expects full path name for both args

func SaveToCsv

func SaveToCsv(fname string, data [][]string)

func SplitFilename

func SplitFilename(fileName string) (string, string)

SplitFilename return the filename without extension and the extension (with leading dot)

Types

This section is empty.

Jump to

Keyboard shortcuts

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