| 448 | } |
| 449 | |
| 450 | DateTime UnixFileSystem::GetFileLastEditTime(const StringView& path) |
| 451 | { |
| 452 | struct stat fileInfo; |
| 453 | const UnixString pathANSI(*path, path.Length()); |
| 454 | if (stat(pathANSI.Get(), &fileInfo) == -1) |
| 455 | { |
| 456 | return DateTime::MinValue(); |
| 457 | } |
| 458 | |
| 459 | const TimeSpan timeSinceEpoch(0, 0, 0, fileInfo.st_mtime); |
| 460 | return UnixEpoch + timeSinceEpoch; |
| 461 | } |
| 462 | |
| 463 | #endif |