| 242 | } |
| 243 | |
| 244 | uint64 UnixFileSystem::GetFileSize(const StringView& path) |
| 245 | { |
| 246 | struct stat fileInfo; |
| 247 | fileInfo.st_size = 0; |
| 248 | const UnixString pathANSI(*path, path.Length()); |
| 249 | if (stat(pathANSI.Get(), &fileInfo) != -1) |
| 250 | { |
| 251 | // Check for directories |
| 252 | if (S_ISDIR(fileInfo.st_mode)) |
| 253 | { |
| 254 | fileInfo.st_size = 0; |
| 255 | } |
| 256 | } |
| 257 | return fileInfo.st_size; |
| 258 | } |
| 259 | |
| 260 | bool UnixFileSystem::IsReadOnly(const StringView& path) |
| 261 | { |