#include <cstdint>
#include <string>
+#include <msp/core/mspcore_api.h>
#include <msp/time/timestamp.h>
#include "path.h"
/**
Holds file information.
*/
-class Stat
+class MSPCORE_API Stat
{
private:
struct 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();
{ 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)