MCPcopy Create free account
hub / github.com/Parchive/par2cmdline / GetFileSize

Method GetFileSize

src/diskfile.cpp:415–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415u64 DiskFile::GetFileSize(std::string filename)
416{
417 std::wstring wfilename = utf8::Utf8ToWide(filename);
418 struct _stati64 st;
419 if ((0 == _wstati64(wfilename.c_str(), &st)) && (0 != (st.st_mode & S_IFREG)))
420 {
421 return st.st_size;
422 }
423 else
424 {
425 return 0;
426 }
427}
428
429bool DiskFile::FileExists(std::string filename)
430{

Callers

nothing calls this directly

Calls 2

Utf8ToWideFunction · 0.85
statClass · 0.85

Tested by

no test coverage detected