MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / stat

Class stat

Libraries/Plugin/Internal/PluginFileSystem.h:40–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 auto deferClose = MakeDeferred([&]() { ::close(fd); });
39
40 struct stat fileStat;
41 SC_TRY_MSG(::fstat(fd, &fileStat) != -1, "Failed to get file stat");
42 SC_TRY_MSG(buffer.resizeWithoutInitializing(static_cast<size_t>(fileStat.st_size)), "Failed to grow buffer");
43 ssize_t bytesRead = ::read(fd, buffer.data(), static_cast<size_t>(fileStat.st_size));

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected