fs/FileInfo: new library providing GetFileInfo()

Replaces StatFile(), with a portable data object.
This commit is contained in:
Max Kellermann
2015-02-28 20:42:50 +01:00
parent 00583bc4a8
commit 90a61b6bab
11 changed files with 171 additions and 70 deletions

View File

@@ -25,6 +25,7 @@
#include "../Timer.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/FileSystem.hxx"
#include "fs/FileInfo.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
@@ -105,8 +106,8 @@ FifoOutput::Close()
output = -1;
}
struct stat st;
if (created && StatFile(path, st))
FileInfo fi;
if (created && GetFileInfo(path, fi))
Delete();
}