MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetFileSize

Method GetFileSize

Source/Engine/Platform/Unix/UnixFileSystem.cpp:244–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244uint64 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
260bool UnixFileSystem::IsReadOnly(const StringView& path)
261{

Callers

nothing calls this directly

Calls 3

statClass · 0.70
LengthMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected