12 #include <string_view> 13 #include "fcitx-utils/fcitxutils_export.h" 21 FCITXUTILS_DEPRECATED_EXPORT
bool makePath(
const std::string &path) {
22 return makePath(std::filesystem::path(path));
25 FCITXUTILS_DEPRECATED_EXPORT std::string
baseName(
const std::string &path) {
26 return baseName(std::string_view(path));
29 FCITXUTILS_DEPRECATED_EXPORT int64_t
modifiedTime(
const std::string &path) {
34 if (!file.isValid()) {
37 UniqueFilePtr fd(fdopen(file.fd(), modes));
std::string baseName(std::string_view path)
Get base file name of path.
Simple file system related API for checking file status.
Utility class that wraps around UnixFD.
Utility classes to handle XDG file path.
bool makePath(const std::filesystem::path &path)
Create directory recursively.
UniqueFilePtr openFD(UnixFD &fd, const char *modes)
open the unix fd with fdopen.
int64_t modifiedTime(const std::filesystem::path &path)
Return modified time in seconds of given path.