Commit 07a51957 authored by Max Kellermann's avatar Max Kellermann

fs/FileInfo: remove the obsolete class Error overloads

parent 37c4470f
......@@ -22,7 +22,6 @@
#include "check.h"
#include "Path.hxx"
#include "util/Error.hxx"
#include "system/Error.hxx"
#include <stdint.h>
......@@ -53,8 +52,6 @@ FileTimeToTimeT(FILETIME ft)
class FileInfo {
friend bool GetFileInfo(Path path, FileInfo &info,
bool follow_symlinks);
friend bool GetFileInfo(Path path, FileInfo &info,
Error &error);
friend class FileReader;
#ifdef WIN32
......@@ -145,27 +142,4 @@ GetFileInfo(Path path, FileInfo &info, bool follow_symlinks=true)
#endif
}
inline bool
GetFileInfo(Path path, FileInfo &info, bool follow_symlinks, Error &error)
{
bool success = GetFileInfo(path, info, follow_symlinks);
if (!success) {
const auto path_utf8 = path.ToUTF8();
#ifdef WIN32
error.FormatLastError("Failed to access %s",
path_utf8.c_str());
#else
error.FormatErrno("Failed to access %s", path_utf8.c_str());
#endif
}
return success;
}
inline bool
GetFileInfo(Path path, FileInfo &info, Error &error)
{
return GetFileInfo(path, info, true, error);
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment