/
githubmirror
/
GoFrame
Обзор
Документация
Войти
/
githubmirror
/
GoFrame
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
internal/fileinfo/fileinfo.go
53 строки
951 B
John Guo
copyright comment update
17 янв 2021, 16:46
17 янв 2021, 16:46
093034a
Код
Авторство
О чём код?
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, // You can obtain one at https://github.com/gogf/gf. // Package fileinfo provides virtual os.FileInfo for given information. package fileinfo import ( "os" "time" ) type Info struct { name string size int64 mode os.FileMode modTime time.Time } func New(name string, size int64, mode os.FileMode, modTime time.Time) *Info { return &Info{ name: name, size: size, mode: mode, modTime: modTime, } } func (i *Info) Name() string { return i.name } func (i *Info) Size() int64 { return i.size } func (i *Info) IsDir() bool { return i.mode.IsDir() } func (i *Info) Mode() os.FileMode { return i.mode } func (i *Info) ModTime() time.Time { return i.modTime } func (i *Info) Sys() interface{} { return nil }