2023-06-09 20:45:06 +00:00
|
|
|
/**
|
|
|
|
* @file Path.cpp
|
|
|
|
* @author apio (cloudapio.eu)
|
|
|
|
* @brief Dirfd-friendly Path class.
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2023, the Luna authors.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2023-05-03 15:37:26 +00:00
|
|
|
#include <os/Path.h>
|
|
|
|
|
|
|
|
namespace os
|
|
|
|
{
|
|
|
|
Path::Path(const char* path) : m_dirfd(), m_name(path)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
Path::Path(StringView path) : m_dirfd(), m_name(path)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
Path::Path(int fd) : m_dirfd(fd), m_name()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
Path::Path(int dirfd, StringView name) : m_dirfd(dirfd), m_name(name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|