_file

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentType

func ContentType(filepath string) string

func Copy

func Copy(sourceFilepath string, targetFilePath string)

func Create

func Create(filepath string)

func Exists

func Exists(filepath string) bool

func Read

func Read(filepath string) []byte

func ReadAsInt64

func ReadAsInt64(filepath string) int64

func ReadAsString

func ReadAsString(filepath string) string

func Rename

func Rename(source string, target string)
func Unlink(filepath string)

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func Open

func Open(filepath string, flag int, perm os.FileMode) *File

func (*File) Close

func (this *File) Close()

func (*File) Read

func (this *File) Read() []byte

func (*File) ReadAsInt64

func (this *File) ReadAsInt64() int64

func (*File) ReadAsString

func (this *File) ReadAsString() string

func (*File) Write

func (this *File) Write(content interface{})

func (*File) WriteOffset

func (this *File) WriteOffset(content interface{}, offset int64)

Jump to

Keyboard shortcuts

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