| 26547 | } |
| 26548 | |
| 26549 | void updateStatInfoForFile (const String& path, bool* const isDir, int64* const fileSize, |
| 26550 | Time* const modTime, Time* const creationTime, bool* const isReadOnly) |
| 26551 | { |
| 26552 | if (isDir != nullptr || fileSize != nullptr || modTime != nullptr || creationTime != nullptr) |
| 26553 | { |
| 26554 | juce_statStruct info; |
| 26555 | const bool statOk = juce_stat (path, info); |
| 26556 | |
| 26557 | if (isDir != nullptr) *isDir = statOk && ((info.st_mode & S_IFDIR) != 0); |
| 26558 | if (fileSize != nullptr) *fileSize = statOk ? info.st_size : 0; |
| 26559 | if (modTime != nullptr) *modTime = Time (statOk ? (int64) info.st_mtime * 1000 : 0); |
| 26560 | if (creationTime != nullptr) *creationTime = Time (statOk ? (int64) info.st_ctime * 1000 : 0); |
| 26561 | } |
| 26562 | |
| 26563 | if (isReadOnly != nullptr) |
| 26564 | *isReadOnly = access (path.toUTF8(), W_OK) != 0; |
| 26565 | } |
| 26566 | |
| 26567 | Result getResultForErrno() |
| 26568 | { |