1 #ifndef SILICIUM_FILE_SIZE_HPP
2 #define SILICIUM_FILE_SIZE_HPP
20 if (!GetFileSizeEx(file, &size))
24 assert(size.QuadPart >= 0);
25 return static_cast<boost::uint64_t
>(size.QuadPart);
28 if (fstat(file, &buffer) < 0)
32 if ((buffer.st_mode & S_IFMT) != S_IFREG)
36 return static_cast<boost::uint64_t
>(buffer.st_size);
Si::error_or< Si::optional< boost::uint64_t > > file_size(Si::native_file_descriptor file)
Definition: file_size.hpp:16
Definition: absolute_path.hpp:19
Definition: error_or.hpp:48
SILICIUM_USE_RESULT boost::system::error_code get_last_error()
Definition: get_last_error.hpp:16