29 #ifndef Pt_System_FileInfo_h
30 #define Pt_System_FileInfo_h
32 #include <Pt/System/Api.h>
33 #include <Pt/System/Path.h>
34 #include <Pt/DateTime.h>
35 #include <Pt/String.h>
156 {
return FileInfo::isLink(_path); }
162 static bool isLink(
const Path& path);
172 {
return type(path) != Invalid; }
236 #endif // Pt_System_FileInfo_h
Type
File-node type.
Definition: FileInfo.h:108
Core module.
Definition: Allocator.h:33
static void remove(const Path &path)
Removes a file or directory.
bool operator==(const FileInfo &a, const FileInfo &b)
Compare two FileInfo objects.
Definition: FileInfo.h:218
static Pt::uint64_t size(const Path &path)
Returns the size of the file in bytes.
Provides information about a node in the file-system.
Definition: FileInfo.h:104
static void removeAll(const Pt::System::Path &path)
Removes a directory and its contents.
Pt::uint64_t size() const
Returns the file size.
Definition: FileInfo.h:148
FileInfo(const Pt::String &path)
Constructs from the path.
~FileInfo()
Destructor.
Definition: FileInfo.h:133
uint_type uint64_t
Unsigned 64-bit integer type.
Definition: Api-Types.h:62
FileInfo(const Path &path)
Constructs from the path.
static void createDirectory(const Path &path)
Creates a new directory.
Type type() const
Returns the file type.
Definition: FileInfo.h:152
const Path & path() const
Returns the full path of node in the file-system.
Definition: FileInfo.h:144
FileInfo()
Default constructor.
Definition: FileInfo.h:117
static void move(const Path &path, const Path &to)
Moves a file or directory.
FileInfo(const char *path)
Constructs from the path.
static Type type(const Path &path)
Returns the type of file at the path.
static void resize(const Path &path, Pt::uint64_t n)
Resizes a file.
Represents a path in the file-system.
Definition: Path.h:48
static void createFile(const Path &path)
Creates a new file.
static DateTime lastModified(const Path &path)
Returns the time when last modified.
bool operator!=(const FileInfo &a, const FileInfo &b)
Compare two FileInfo objects.
Definition: FileInfo.h:227
Unicode capable basic_string.
Definition: Api-String.h:44
static bool exists(const Path &path)
Returns true if a file or directory exists at the path.
Definition: FileInfo.h:171
static void createDirectories(const Path &path)
Creates a new directory.
void clear()
Clears the state.
Combined Date and Time value.
Definition: DateTime.h:66
bool operator<(const FileInfo &a, const FileInfo &b)
Compare two FileInfo objects.
Definition: FileInfo.h:209