X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ffs%2Fstat.h;h=e2400ed9b5a037b2a4396aa92d0fb92e01009118;hp=3f056a5609eea802716037eb734c3d42ef51905d;hb=HEAD;hpb=062b200b08ec5998c4c02326e1e7b4e71fe4a5c6 diff --git a/source/fs/stat.h b/source/fs/stat.h index 3f056a5..fd6a2f7 100644 --- a/source/fs/stat.h +++ b/source/fs/stat.h @@ -1,8 +1,9 @@ #ifndef MSP_FS_STAT_H_ #define MSP_FS_STAT_H_ +#include #include -#include +#include #include #include "path.h" @@ -17,12 +18,12 @@ enum FileType SYMLINK }; -typedef UInt64 FileSize; +typedef uint64_t FileSize; /** Holds file information. */ -class Stat +class MSPCORE_API Stat { private: struct Private; @@ -33,16 +34,16 @@ private: std::string group; }; - bool exists; - FileType type; - FileSize size; - FileSize alloc_size; + bool exists = false; + FileType type = UNKNOWN; + FileSize size = 0; + FileSize alloc_size = 0; Time::TimeStamp mtime; mutable OwnerInfo owner_info; - Private *priv; + Private *priv = nullptr; public: - Stat(); + Stat() = default; Stat(const Stat &); Stat &operator=(const Stat &); ~Stat(); @@ -73,7 +74,7 @@ inline Stat lstat(const Path &path) { return Stat::lstat(path); } /// Tests for existence of a file -bool exists(const Path &path); +MSPCORE_API bool exists(const Path &path); /// Tests whether a path refers to an existing regular file inline bool is_reg(const Path &path)