storage/FileInfo: rename to StorageFileInfo

This commit is contained in:
Max Kellermann
2015-02-28 20:50:15 +01:00
parent e1a434edbc
commit 2d06a8e880
19 changed files with 95 additions and 86 deletions
+12 -12
View File
@@ -84,7 +84,7 @@ public:
}
/* virtual methods from class Storage */
bool GetInfo(const char *uri_utf8, bool follow, FileInfo &info,
bool GetInfo(const char *uri_utf8, bool follow, StorageFileInfo &info,
Error &error) override;
StorageDirectoryReader *OpenDirectory(const char *uri_utf8,
@@ -245,14 +245,14 @@ NfsStorage::MapToRelativeUTF8(const char *uri_utf8) const
}
static void
Copy(FileInfo &info, const struct stat &st)
Copy(StorageFileInfo &info, const struct stat &st)
{
if (S_ISREG(st.st_mode))
info.type = FileInfo::Type::REGULAR;
info.type = StorageFileInfo::Type::REGULAR;
else if (S_ISDIR(st.st_mode))
info.type = FileInfo::Type::DIRECTORY;
info.type = StorageFileInfo::Type::DIRECTORY;
else
info.type = FileInfo::Type::OTHER;
info.type = StorageFileInfo::Type::OTHER;
info.size = st.st_size;
info.mtime = st.st_mtime;
@@ -262,11 +262,11 @@ Copy(FileInfo &info, const struct stat &st)
class NfsGetInfoOperation final : public BlockingNfsOperation {
const char *const path;
FileInfo &info;
StorageFileInfo &info;
public:
NfsGetInfoOperation(NfsConnection &_connection, const char *_path,
FileInfo &_info)
StorageFileInfo &_info)
:BlockingNfsOperation(_connection), path(_path), info(_info) {}
protected:
@@ -281,7 +281,7 @@ protected:
bool
NfsStorage::GetInfo(const char *uri_utf8, gcc_unused bool follow,
FileInfo &info, Error &error)
StorageFileInfo &info, Error &error)
{
const std::string path = UriToNfsPath(uri_utf8, error);
if (path.empty())
@@ -304,19 +304,19 @@ SkipNameFS(const char *name)
}
static void
Copy(FileInfo &info, const struct nfsdirent &ent)
Copy(StorageFileInfo &info, const struct nfsdirent &ent)
{
switch (ent.type) {
case NF3REG:
info.type = FileInfo::Type::REGULAR;
info.type = StorageFileInfo::Type::REGULAR;
break;
case NF3DIR:
info.type = FileInfo::Type::DIRECTORY;
info.type = StorageFileInfo::Type::DIRECTORY;
break;
default:
info.type = FileInfo::Type::OTHER;
info.type = StorageFileInfo::Type::OTHER;
break;
}