files

package
v0.0.0-...-fd75161 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2015 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CerateTempFile

func CerateTempFile(fileName string)

Create a temporary file which will remove at file end

func ChangeOwnership

func ChangeOwnership(fileName string, uid, gid int)

Change a file ownership

func ChangePermission

func ChangePermission(fileName string, mode int)

Change file permission

func ChangeTime

func ChangeTime(fileName string, atime, mtime time.Time)

Change file timestamps

func CheckPermission

func CheckPermission(fileName string)

Check write permission

func ChecksumFile

func ChecksumFile(fileName string)

Create checksum by file handler

func ChecksumFileContent

func ChecksumFileContent(fileName string)

Create checksum from a file content

func CompressFile

func CompressFile(gzFileName string, fileName string)

Compress "fileName" to zip "gzFileName"

func Copy

func Copy(oldname, newname string) (err error)

Copy file (hard link)

func CreateArchiveFile

func CreateArchiveFile(zipName string, fileNames []string)

Archive given files

func CreateEmptly

func CreateEmptly(fileName string)

Just create an empty file

func Delete

func Delete(fileName string)

Delete a file

func ExtractArchiveFile

func ExtractArchiveFile(zipName string, targetDirectory string)

Extract a zip archive file

func FileFromHTTP

func FileFromHTTP(fileName, url string)

Read file from HTTP and write content to a file.

func GetInfo

func GetInfo(fileName string)

Display file information

func HardLink(oldname, newname string)

Create a hard link

func Move

func Move(oldLoc string, newLoc string)

Move file to new location

func Open

func Open(fileName string)

Example of how to open a file.

func Read

func Read(fileName string, len int)

Read file by given length

func Seek

func Seek(fileName string, offset int64, whence int) int64

seek file

func SymLink(oldname, newname string)

Create symbolic link

func Truncate

func Truncate(fileName string, size int64)

Truncate a file by given size

func UncompressFile

func UncompressFile(gzFileName string, newFileName string)

Uncompress file "gzFileName" to "newFileName"

func Write

func Write(fileName string, content []byte)

Write content to a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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