Documentation
¶
Index ¶
- func After(t time.Duration, f func() interface{}) (interf interface{})
- func Conversion(c ByteConversion, s string) string
- func GetDay() int
- func GetMonth() int
- func GetNanoSecond() int64
- func GetNow() (now string)
- func GetSecond() int64
- func GetTimeInterval(year int, month time.Month, day int) (y, d int)
- func GetTimestamp(year int, month time.Month, day, hour, minute, sec int) (nanosecond, second int64)
- func GetWeekday() string
- func GetYear() int
- func NewTicker(t time.Duration, f func() interface{}) (interf interface{})
- func NewTimer(t time.Duration, f func() interface{}) (interf interface{})
- func NsecToTimeDate(nsec int64) (s string)
- func SecToTimeDate(sec int64) (s string)
- func Sleep(t int)
- func StringToTimeDate(s string) (t time.Time)
- func Tick(t time.Duration, f func() interface{}) (interf interface{})
- type Byte
- type ByteConversion
- type File
- func (f File) BufioFile(name string) (n, w int, s string, err error)
- func (f File) CopyByteFile(source, target string) (err error)
- func (f File) CopyFile(source, target string) (n int64, err error)
- func (f File) CreateFile(name string) (file *os.File, err error)
- func (f File) CreateFolder(name string) (err error)
- func (f File) DirsFiles(root string) (n int64, slice []string, err error)
- func (f File) GetFileInfo(name string) (m map[string]interface{}, err error)
- func (f File) IoutilDir(dirname string) (err error)
- func (f File) IoutilFile(name string) (n, w int, s string, err error)
- func (f File) RuleFile(name string) (n, w int, s string, err error)
- func (f File) WriteATFile(name, word string, offset int64, whence int) (n int, err error)
- func (f File) WriteNewFile(name, word string) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTimeInterval ¶
获取时间间隔,返回值:年数,天数。
func GetTimestamp ¶
func GetTimestamp(year int, month time.Month, day, hour, minute, sec int) (nanosecond, second int64)
获取指定时间戳,返回值:纳秒、秒。
func StringToTimeDate ¶
字符串转日期时间,参数格式:2006-1-2 15:4:5。
Types ¶
type ByteConversion ¶
type ByteConversion interface {
// contains filtered or unexported methods
}
字节换算接口
type File ¶
type File struct { }
文件操作空结构体
func (File) CopyByteFile ¶
复制文件(字节),并获取反馈信息。
func (File) CreateFile ¶
创建文件,并返回文件句柄、反馈信息。
func (File) GetFileInfo ¶
获取文件(夹)各项信息:名称、大小、创建时间、最后写入时间、最后打开时间,以及反馈信息。
func (File) IoutilFile ¶
打开小文件(无缓冲),并获取文件大小、字数,内容,以及反馈信息
func (File) WriteATFile ¶
文件任意位置写入数据,并获取写入数据字节数,以及反馈信息。
Click to show internal directories.
Click to hide internal directories.