This commit is contained in:
parent
bdfba6c96d
commit
a2d4817e15
|
@ -14,12 +14,7 @@ var File = myfile{}
|
|||
|
||||
// GetFileSize get the length in bytes of file of the specified path.
|
||||
func (*myfile) GetFileSize(path string) int64 {
|
||||
f, err := os.Open(path)
|
||||
if nil != err {
|
||||
return -1
|
||||
}
|
||||
|
||||
fi, err := f.Stat()
|
||||
fi, err := os.Stat(path)
|
||||
if nil != err {
|
||||
return -1
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue