9 #ifndef CPPCOMMON_FILESYSTEM_SYMLINK_H
10 #define CPPCOMMON_FILESYSTEM_SYMLINK_H
38 {
Assign(path);
return *
this; }
bool IsSymlink() const
Is the path points to symbolic link?
Path & Assign(const Path &path)
Assign the given path to the current one.
bool empty() const noexcept
Is the path empty?
Symlink & operator=(const Path &path)
Symlink & operator=(Symlink &&)=default
static Path CreateHardlink(const Path &src, const Path &dst)
Create a new hardlink.
Symlink(const Path &path)
Initialize symbolic link with a given path.
bool IsTargetExists() const
Is the target exists?
static Symlink CopySymlink(const Path &src, const Path &dst)
Copy the current symlink to another destination path.
Symlink()
Initialize symbolic link with an empty path.
Symlink(const Symlink &)=default
static Symlink CreateSymlink(const Path &src, const Path &dst)
Create a new symlink.
Symlink(Symlink &&)=default
Symlink & operator=(const Symlink &)=default
void swap(Symlink &symlink) noexcept
Swap two instances.
Path target() const
Read symlink target path.
bool IsSymlinkExists() const
Is the symlink exists?
C++ Common project definitions.
Filesystem path definition.
Filesystem symlink inline implementation.