Documentation ¶
Index ¶
- Variables
- type Config
- type File
- func (t *File) Close() error
- func (t *File) CopyFromIoReader(from io.Reader, copyIOConfig pio.CopyConfig) error
- func (t *File) CopyTo(to *File, copyIOConfig pio.CopyConfig, tryLock bool) error
- func (t *File) CopyToIoWriter(to io.Writer, copyIOConfig pio.CopyConfig) error
- func (t *File) CopyToUntil(to *File, untilBytes []byte, perReadSize int, maxReadSize int, tryLock bool) (e error)
- func (t *File) Create(mode ...fs.FileMode)
- func (t *File) CurIndex() (ret int64, err error)
- func (t *File) Delete() error
- func (t *File) DirFiles() (files []string, err error)
- func (t *File) File() *os.File
- func (t *File) GetFileModTime() (mod int64, err error)
- func (t *File) GetFileSize() (int64, error)
- func (t *File) HavePerm(want os.FileMode) (bool, error)
- func (t *File) IsDir() bool
- func (t *File) IsExist() bool
- func (t *File) IsOpen() bool
- func (t *File) Read(data []byte) (int, error)
- func (t *File) ReadAll(perReadSize int, maxReadSize int) (data []byte, e error)
- func (t *File) ReadUntil(untilBytes []byte, perReadSize int, maxReadSize int) (data []byte, e error)
- func (t *File) SeekIndex(index int64, whence FileWhence) (e error)
- func (t *File) SeekUntil(untilBytes []byte, whence FileWhence, perReadSize int, maxReadSize int) (e error)
- func (t *File) Stat() (fs.FileInfo, error)
- func (t *File) Sync() (e error)
- func (t *File) Write(data []byte, tryLock bool) (int, error)
- type FileWhence
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { Config Config // contains filtered or unexported fields }
func (*File) CopyFromIoReader ¶ added in v0.28.1
func (*File) CopyToIoWriter ¶ added in v0.10.14
func (*File) CopyToUntil ¶ added in v0.28.1
func (t *File) CopyToUntil(to *File, untilBytes []byte, perReadSize int, maxReadSize int, tryLock bool) (e error)
stop after untilBytes
data not include untilBytes
func (*File) GetFileModTime ¶ added in v0.28.20240806162427
func (*File) GetFileSize ¶ added in v0.28.20240806162427
func (*File) ReadUntil ¶
func (t *File) ReadUntil(untilBytes []byte, perReadSize int, maxReadSize int) (data []byte, e error)
stop after untilBytes
data not include untilBytes
func (*File) SeekIndex ¶ added in v0.28.1
func (t *File) SeekIndex(index int64, whence FileWhence) (e error)
Seek sets the offset for the next Read or Write on file to offset
type FileWhence ¶ added in v0.24.11
type FileWhence int
const ( AtOrigin FileWhence = iota AtCurrent AtEnd )
Click to show internal directories.
Click to hide internal directories.