X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Futils.h;h=9b4a1e0f706d972f3f3cfbc3472a047cbd35129e;hp=a6d956869bf633d531d35e24636b8b37519e35f4;hb=1834fcf2465c77c387bc92df5529d8631abaffa5;hpb=4dda68c467fe1e759e0d67e4ec844ac0130e6127 diff --git a/source/utils.h b/source/utils.h index a6d9568..9b4a1e0 100644 --- a/source/utils.h +++ b/source/utils.h @@ -8,11 +8,11 @@ Distributed under the LGPL #ifndef MSP_FS_UTILS_H_ #define MSP_FS_UTILS_H_ +#include "path.h" + namespace Msp { namespace FS { -class Path; - /// Extracts the last component of the path. std::string basename(const Path &); @@ -37,6 +37,12 @@ filesystem. */ Path fix_case(const Path &path); +/// Reads the contents of a symbolic link +Path readlink(const Path &path); + +/// Resolves all symlinks from a path. Will always return an absolute path. +Path realpath(const Path &path); + /// Removes a file void unlink(const Path &path);