Documentation ¶
Index ¶
- Variables
- func CopyDir(src string, dst string) error
- func CopyFile(src, dst string) error
- func CreateDir(path string) error
- func CreateFile(path string) bool
- func DirExists(path string) bool
- func Exists(path string) bool
- func FileExists(path string) bool
- func FilePutContents(fileName, data string, flags ...interface{}) (int, error)
- func GetExePath() (exePath string, err error)
- func GetFileDir(filePath string) string
- func IsDir(fileName string) bool
- func IsFile(fp string) bool
- func IsLink(fileName string) bool
- func IsRegularFile(fileName string) bool
- func WriteFileAtomic(filename string, data []byte, perm os.FileMode) error
- func WritePid(path string) (err error)
- func WritePidById(id string, path string) error
- type SectionWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExceedLimit = errors.New("write exceed limit")
View Source
var ErrOffset = errors.New("Seek: invalid offset")
View Source
var ErrWhence = errors.New("Seek: invalid whence")
Functions ¶
func CreateFile ¶ added in v0.0.6
func FileExists ¶ added in v0.0.4
func FilePutContents ¶ added in v0.0.4
FilePutContents write files with offset/limit fileName name of file to where put data flags[0] - flags how to put this data FileAppend | LockEx
func GetExePath ¶
func GetFileDir ¶
func IsRegularFile ¶ added in v0.0.4
IsRegularFile tells whether the filename is a regular file
func WriteFileAtomic ¶ added in v0.0.4
Write file to temp and atomically move when everything else succeeds.
func WritePidById ¶
Types ¶
type SectionWriter ¶ added in v0.0.4
type SectionWriter struct {
// contains filtered or unexported fields
}
func NewSectionWriter ¶ added in v0.0.4
func NewSectionWriter(w io.WriterAt, off int64, n int64) *SectionWriter
func (*SectionWriter) Seek ¶ added in v0.0.4
func (s *SectionWriter) Seek(offset int64, whence int) (int64, error)
func (*SectionWriter) Size ¶ added in v0.0.4
func (s *SectionWriter) Size() int64
Size returns the size of the section in bytes.
Click to show internal directories.
Click to hide internal directories.