Documentation ¶
Index ¶
- func BirthtimeIsWithin(expected time.Time, d time.Duration) oglematchers.Matcher
- func GetTimes(fi os.FileInfo) (atime, ctime, mtime time.Time)
- func MtimeIs(expected time.Time) oglematchers.Matcher
- func MtimeIsWithin(expected time.Time, d time.Duration) oglematchers.Matcher
- func NlinkIs(expected uint64) oglematchers.Matcher
- func ReadDirPicky(dirname string) (entries []os.FileInfo, err error)
- func RunCreateInParallelTest_Exclusive(ctx context.Context, dir string)
- func RunCreateInParallelTest_NoTruncate(ctx context.Context, dir string)
- func RunCreateInParallelTest_Truncate(ctx context.Context, dir string)
- func RunHardlinkInParallelTest(ctx context.Context, dir string)
- func RunMkdirInParallelTest(ctx context.Context, dir string)
- func RunSymlinkInParallelTest(ctx context.Context, dir string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BirthtimeIsWithin ¶
Match os.FileInfo values that specify a file birth time within the supplied radius of the given time. On platforms where there is no birth time available, match all os.FileInfo values.
func GetTimes ¶
Extract time information from the supplied file info. Panic on platforms where this is not possible.
func MtimeIs ¶
func MtimeIs(expected time.Time) oglematchers.Matcher
Match os.FileInfo values that specify an mtime equal to the given time.
func MtimeIsWithin ¶
Like MtimeIs, but allows for a tolerance.
func NlinkIs ¶
func NlinkIs(expected uint64) oglematchers.Matcher
Match os.FileInfo values that specify a number of links equal to the given number. On platforms where there is no nlink field available, match all os.FileInfo values.
func ReadDirPicky ¶
Read the directory with the given name and return a list of directory entries, sorted by name.
Unlike ioutil.ReadDir (cf. http://goo.gl/i0nNP4), this function does not silently ignore "file not found" errors when stat'ing the names read from the directory.
func RunCreateInParallelTest_Exclusive ¶
Run an ogletest test that checks expectations for parallel calls to open(2) with O_CREAT|O_EXCL.
func RunCreateInParallelTest_NoTruncate ¶
Run an ogletest test that checks expectations for parallel calls to open(2) with O_CREAT.
func RunCreateInParallelTest_Truncate ¶
Run an ogletest test that checks expectations for parallel calls to open(2) with O_CREAT|O_TRUNC.
func RunHardlinkInParallelTest ¶
Run an ogletest test that checks expectations for parallel calls to link(2).
func RunMkdirInParallelTest ¶
Run an ogletest test that checks expectations for parallel calls to mkdir(2).
func RunSymlinkInParallelTest ¶
Run an ogletest test that checks expectations for parallel calls to symlink(2).
Types ¶
This section is empty.