properly working filer
This commit is contained in:
@@ -21,6 +21,11 @@ func (fp FullPath) DirAndName() (string, string) {
|
||||
return dir[:len(dir)-1], name
|
||||
}
|
||||
|
||||
func (fp FullPath) Name() (string) {
|
||||
_, name := filepath.Split(string(fp))
|
||||
return name
|
||||
}
|
||||
|
||||
type Attr struct {
|
||||
Mtime time.Time // time of last modification
|
||||
Crtime time.Time // time of creation (OS X only)
|
||||
@@ -29,6 +34,10 @@ type Attr struct {
|
||||
Gid uint32 // group gid
|
||||
}
|
||||
|
||||
func (attr Attr) IsDirectory() (bool) {
|
||||
return attr.Mode & os.ModeDir > 0
|
||||
}
|
||||
|
||||
type Entry struct {
|
||||
FullPath
|
||||
|
||||
|
||||
Reference in New Issue
Block a user