@@ -211,10 +211,10 @@ func (p *Path) IsDir() (bool, error) {
211211 return afero .IsDir (p .Fs (), p .String ())
212212}
213213
214- // IsDir returns whether or not the os.FileInfo object represents a
214+ // IsDir returns whether or not the os.FileMode object represents a
215215// directory.
216- func IsDir (fileInfo os.FileInfo ) bool {
217- return fileInfo .IsDir ()
216+ func IsDir (mode os.FileMode ) bool {
217+ return mode .IsDir ()
218218}
219219
220220// IsEmpty checks if a given file or directory is empty.
@@ -484,13 +484,13 @@ func (p *Path) IsFile() (bool, error) {
484484 if err != nil {
485485 return false , err
486486 }
487- return IsFile (fileInfo ), nil
487+ return IsFile (fileInfo . Mode () ), nil
488488}
489489
490490// IsFile returns whether or not the file described by the given
491- // os.FileInfo is a regular file.
492- func IsFile (fileInfo os.FileInfo ) bool {
493- return fileInfo . Mode () .IsRegular ()
491+ // os.FileMode is a regular file.
492+ func IsFile (mode os.FileMode ) bool {
493+ return mode .IsRegular ()
494494}
495495
496496// IsSymlink returns true if the given path is a symlink.
@@ -500,13 +500,13 @@ func (p *Path) IsSymlink() (bool, error) {
500500 if err != nil {
501501 return false , err
502502 }
503- return IsSymlink (fileInfo ), nil
503+ return IsSymlink (fileInfo . Mode () ), nil
504504}
505505
506506// IsSymlink returns true if the file described by the given
507- // os.FileInfo describes a symlink.
508- func IsSymlink (fileInfo os.FileInfo ) bool {
509- return fileInfo . Mode () & os .ModeSymlink != 0
507+ // os.FileMode describes a symlink.
508+ func IsSymlink (mode os.FileMode ) bool {
509+ return mode & os .ModeSymlink != 0
510510}
511511
512512// DeepEquals returns whether or not the path pointed to by other
0 commit comments