-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improved windows Get() performance (x100) by not returning ChangeTime
in order to obtain the ChangeTime is was necessary to open the file, however Get() should only inspect the contents of the passed os.FileInfo. Stat() on the other hand does still open the file and can still obtain ChangeTime.
- Loading branch information
Showing
4 changed files
with
15 additions
and
15 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// +build !windows | ||
|
||
package times | ||
|
||
import "os" | ||
|
||
func Stat(name string) (Timespec, error) { | ||
fi, err := os.Stat(name) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return getTimespec(fi), 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