Returns the actual size (that is, the size including any FESF private meta-data and the Solution Policy Header).
uint64_t
FesfUtil2GetFileSize(std::wstring_view FileToCheck);
DWORD
FesfUtil2GetFileSize_C(
[in] LPCWSTR
FileToCheck,
[out] DWORD64*
TrueFileSize);
FileToCheck
Fully qualified path name for the file.
The size of the file, in bytes.
Throws an FEU2Exception if an error is encountered.
The "actual" or "true" size of a file that is FESF encrypted is different from the "corrected" file size. The "corrected" size is the size that indicates how much user-data is stored in the file and most closely approximates the size that the file would be if it were NOT encrypted. The "actual" size (returned by this function) is the size that includes all the FESF private meta-data as well as the Solution Policy Header. This size most accurately accounts for the amount of space occupied by the file on disk.
No special privileges are required, though the caller must have read access to the file being queried if the file is local and both read and write access to the file being queried if the file is on the network. Network files require exclusive access.
IFesfDs::GetTrueSize and IFesfUtil::GetTrueFileSize