initial commits

master
Charles Iliya Krempeaux 2024-01-23 06:12:03 -08:00
parent f338172829
commit c54c73bc14
1 changed files with 25 additions and 0 deletions

25
filename.go 100644
View File

@ -0,0 +1,25 @@
package raft
import (
"io/fs"
)
// fileName returns the file-name of an fs.File.
func fileName(file fs.File) (string, error) {
if nil == file {
return "", errNilFile
}
var fileinfo fs.FileInfo
{
var err error
fileinfo, err = fileInfo(file)
if nil != err {
return "", err
}
}
return fileinfo.Name(), nil
}