Documentation ¶
Index ¶
- func ContainsElement[T comparable](list []T, ele T) bool
- func DeleteElement[T comparable](list []T, ele T) []T
- func ExistsFile(path string) bool
- func ReadFile(path string) ([]byte, error)
- func RemoveRepeatElement[T comparable](list []T) []T
- func ServerName(data []byte) string
- func WriteBytesFile(path string, dataS ...[]byte) error
- func WriteFile(path string, data []byte) error
- type File
- func (f *File) Abs() string
- func (f *File) Child(path string) (*File, error)
- func (f *File) Close() error
- func (f *File) Exists() (flag bool, err error)
- func (f *File) IsDir() bool
- func (f *File) IsDisk() bool
- func (f *File) List() ([]*File, error)
- func (f *File) MkDirs() error
- func (f *File) ModTime() (*time.Time, error)
- func (f *File) Name() string
- func (f *File) OpenAppendOrCreate() error
- func (f *File) OpenAppendWrite() (*bufio.Writer, error)
- func (f *File) OpenOrCreate() error
- func (f *File) OpenWrite() (*bufio.Writer, error)
- func (f *File) Parent() string
- func (f *File) ParentFile() (*File, error)
- func (f *File) ReadAll() ([]byte, error)
- func (f *File) ReadBytes(p []byte) (n int, err error)
- func (f *File) ToRawFile() (*os.File, error)
- func (f *File) Truncate() error
- func (f *File) WriteAppendBytes(data []byte) error
- func (f *File) WriteBytes(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsElement ¶ added in v0.0.13
func ContainsElement[T comparable](list []T, ele T) bool
func DeleteElement ¶ added in v0.0.13
func DeleteElement[T comparable](list []T, ele T) []T
func ExistsFile ¶
func RemoveRepeatElement ¶ added in v0.0.13
func RemoveRepeatElement[T comparable](list []T) []T
func WriteBytesFile ¶ added in v0.0.13
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func GetRootPath ¶
func (*File) OpenAppendOrCreate ¶
func (*File) OpenOrCreate ¶
func (*File) ParentFile ¶
func (*File) WriteAppendBytes ¶
func (*File) WriteBytes ¶
Click to show internal directories.
Click to hide internal directories.