Documentation ¶
Overview ¶
Package io is the input/output package
Index ¶
- Constants
- Variables
- func CopyContext(ctx context.Context, dst io.Writer, src io.Reader) (int64, error)
- func DeleteFile(path string) error
- func ReadBuffer(path string, buf *bytes.Buffer) (int64, error)
- type ByteReader
- type ByteScanner
- type ByteWriter
- type Closer
- type FileInfo
- type OffsetWriter
- type ReadCloser
- type ReadSeekCloser
- type ReadSeeker
- type ReadWriteCloser
- type ReadWriteSeeker
- type Reader
- type ReaderAt
- type ReaderFrom
- type RuneReader
- type RuneScanner
- type SectionReader
- type Seeker
- type WriteCloser
- type Writer
- type WriterAt
- type WriterTo
Constants ¶
View Source
const ( SeekStart = io.SeekStart SeekCurrent = io.SeekCurrent SeekEnd = io.SeekEnd )
View Source
const ( ErrFileSize = errors.String("file Size is zero") ErrFileType = errors.String("file type is not supported") ErrTargetIsNotDir = errors.String("target is not a directory") ErrFileRead = errors.String("file read error") ErrFileWrite = errors.String("file write error") ErrFileNotExist = errors.String("file not exist") ErrFileName = errors.String("file Path is empty") ErrSizeNotMatch = errors.String("file Size not match") )
Variables ¶
View Source
var ( EOF = io.EOF ErrNoProgress = io.ErrNoProgress ErrUnexpectedEOF = io.ErrUnexpectedEOF ErrShortBuffer = io.ErrShortBuffer ErrShortWrite = io.ErrShortWrite )
View Source
var ( Discard = io.Discard StdWriteString = io.WriteString StdCopy = io.Copy StdCopyBuffer = io.CopyBuffer StdCopyN = io.CopyN StdLimitReader = io.LimitReader StdReadAll = io.ReadAll StdReadFull = io.ReadFull StdReadAtLeast = io.ReadAtLeast StdMultiReader = io.MultiReader StdMultiWriter = io.MultiWriter StdNopCloser = io.NopCloser StdPipe = io.Pipe )
Functions ¶
func CopyContext ¶ added in v0.0.53
CopyContext copy data from src to dst until EOF or error, returning the number of bytes copied.
func DeleteFile ¶
DeleteFile deletes files related to the provided id and param.
Types ¶
type ByteReader ¶
type ByteReader = io.ByteReader
type ByteScanner ¶
type ByteScanner = io.ByteScanner
type ByteWriter ¶
type ByteWriter = io.ByteWriter
type OffsetWriter ¶
type OffsetWriter = io.OffsetWriter
type ReadCloser ¶
type ReadCloser = io.ReadCloser
type ReadSeekCloser ¶
type ReadSeekCloser = io.ReadSeekCloser
type ReadSeeker ¶
type ReadSeeker = io.ReadSeeker
type ReadWriteCloser ¶
type ReadWriteCloser = io.ReadWriteCloser
type ReadWriteSeeker ¶
type ReadWriteSeeker = io.ReadWriteSeeker
type ReaderFrom ¶
type ReaderFrom = io.ReaderFrom
type RuneReader ¶
type RuneReader = io.RuneReader
type RuneScanner ¶
type RuneScanner = io.RuneScanner
type SectionReader ¶
type SectionReader = io.SectionReader
type WriteCloser ¶
type WriteCloser = io.WriteCloser
Click to show internal directories.
Click to hide internal directories.