FileExistsOfSize determines if a file exists and is of a specific size.
(path string, sz int64)
| 44 | |
| 45 | // FileExistsOfSize determines if a file exists and is of a specific size. |
| 46 | func FileExistsOfSize(path string, sz int64) bool { |
| 47 | fi, err := os.Stat(path) |
| 48 | |
| 49 | if err != nil { |
| 50 | return false |
| 51 | } |
| 52 | |
| 53 | return !fi.IsDir() && fi.Size() == sz |
| 54 | } |
| 55 | |
| 56 | // ResolveSymlinks ensures that if the path supplied is a symlink, it is |
| 57 | // resolved to the actual concrete path |
no test coverage detected