properly working filer

This commit is contained in:
Chris Lu
2018-05-13 23:56:16 -07:00
parent f01d5616b3
commit c5cf9bd290
11 changed files with 203 additions and 186 deletions

View File

@@ -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