IsExistsFile check file exists and is a file
(path string)
| 172 | |
| 173 | // IsExistsFile check file exists and is a file |
| 174 | func IsExistsFile(path string) bool { |
| 175 | info, err := os.Stat(path) |
| 176 | // if file exists and is a file |
| 177 | if err == nil && !info.IsDir() { |
| 178 | return true |
| 179 | } |
| 180 | return false |
| 181 | } |
| 182 | |
| 183 | const ( |
| 184 | // MaxFilenameLength is the maximum length in bytes for a filename |