]> git.tdb.fi Git - libs/core.git/blobdiff - source/stat.h
Style update: spaces around assignments
[libs/core.git] / source / stat.h
index f6b13d431a340cddd256336a6e676e668f00c462..55a1fec51b575f50b0208878a4e066a20383c98f 100644 (file)
@@ -9,12 +9,11 @@ Distributed under the LGPL
 #define MSP_FS_STAT_H_
 
 #include <sys/stat.h>
+#include "path.h"
 
 namespace Msp {
 namespace FS {
 
-class Path;
-
 /**
 Gets information about a file.  Returns 0 on success or -1 on error.  This
 version can be used to check for file existence and get information in one
@@ -28,12 +27,24 @@ occurs.
 */
 struct stat stat(const Path &fn);
 
+/// Gets information about a file, without following symbolic links
+int lstat(const Path &fn, struct stat &st);
+
+/// Returns information about a file, without following symbolic links
+struct stat lstat(const Path &fn);
+
 /// Tests for existence of a file
 bool exists(const Path &path);
 
+/// Tests whether a path refers to an existing regular file
+bool is_reg(const Path &path);
+
 /// Tests whether a path refers to an existing directory
 bool is_dir(const Path &path);
 
+/// Tests whether a path refers to a symbolic link
+bool is_link(const Path &path);
+
 } // namespace FS
 } // namespace Msp