-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7eb9e4d
commit 5b80894
Showing
6 changed files
with
115 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package memorystorage | ||
|
||
import ( | ||
"io/fs" | ||
"time" | ||
) | ||
|
||
type FileInfo struct { | ||
NameOut string // base name of the file | ||
SizeOut int64 // length in bytes for regular files; system-dependent for others | ||
ModeOut fs.FileMode // file mode bits | ||
ModTimeOut time.Time // modification time | ||
IsDirOut bool // abbreviation for Mode().IsDir() | ||
SysOut any // underlying data source (can return nil) | ||
} | ||
|
||
func (f FileInfo) Name() string { | ||
return f.NameOut | ||
} | ||
func (f FileInfo) Size() int64 { | ||
return f.SizeOut | ||
} | ||
func (f FileInfo) Mode() fs.FileMode { | ||
return f.ModeOut | ||
} | ||
func (f FileInfo) ModTime() time.Time { | ||
return f.ModTimeOut | ||
} | ||
func (f FileInfo) IsDir() bool { | ||
return f.IsDirOut | ||
} | ||
func (f FileInfo) Sys() any { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters