MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / TranslateStat64

Function TranslateStat64

common/FileSystem.cpp:1612–1625  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1610}
1611
1612static void TranslateStat64(struct stat* st, const struct _stat64& st64)
1613{
1614 static constexpr __int64 MAX_SIZE = static_cast<__int64>(std::numeric_limits<decltype(st->st_size)>::max());
1615 st->st_dev = st64.st_dev;
1616 st->st_ino = st64.st_ino;
1617 st->st_mode = st64.st_mode;
1618 st->st_nlink = st64.st_nlink;
1619 st->st_uid = st64.st_uid;
1620 st->st_rdev = st64.st_rdev;
1621 st->st_size = static_cast<decltype(st->st_size)>((st64.st_size > MAX_SIZE) ? MAX_SIZE : st64.st_size);
1622 st->st_atime = static_cast<time_t>(st64.st_atime);
1623 st->st_mtime = static_cast<time_t>(st64.st_mtime);
1624 st->st_ctime = static_cast<time_t>(st64.st_ctime);
1625}
1626
1627bool FileSystem::StatFile(const char* path, struct stat* st)
1628{

Callers 1

StatFileMethod · 0.85

Calls 1

maxFunction · 0.50

Tested by

no test coverage detected