style(3p/nix): Reformat project in Google C++ style
Reformatted with:
fd . -e hh -e cc | xargs clang-format -i
This commit is contained in:
parent
65a1aae98c
commit
0f2cf531f7
175 changed files with 32126 additions and 34689 deletions
32
third_party/nix/src/libstore/fs-accessor.hh
vendored
32
third_party/nix/src/libstore/fs-accessor.hh
vendored
|
|
@ -6,28 +6,26 @@ namespace nix {
|
|||
|
||||
/* An abstract class for accessing a filesystem-like structure, such
|
||||
as a (possibly remote) Nix store or the contents of a NAR file. */
|
||||
class FSAccessor
|
||||
{
|
||||
public:
|
||||
enum Type { tMissing, tRegular, tSymlink, tDirectory };
|
||||
class FSAccessor {
|
||||
public:
|
||||
enum Type { tMissing, tRegular, tSymlink, tDirectory };
|
||||
|
||||
struct Stat
|
||||
{
|
||||
Type type = tMissing;
|
||||
uint64_t fileSize = 0; // regular files only
|
||||
bool isExecutable = false; // regular files only
|
||||
uint64_t narOffset = 0; // regular files only
|
||||
};
|
||||
struct Stat {
|
||||
Type type = tMissing;
|
||||
uint64_t fileSize = 0; // regular files only
|
||||
bool isExecutable = false; // regular files only
|
||||
uint64_t narOffset = 0; // regular files only
|
||||
};
|
||||
|
||||
virtual ~FSAccessor() { }
|
||||
virtual ~FSAccessor() {}
|
||||
|
||||
virtual Stat stat(const Path & path) = 0;
|
||||
virtual Stat stat(const Path& path) = 0;
|
||||
|
||||
virtual StringSet readDirectory(const Path & path) = 0;
|
||||
virtual StringSet readDirectory(const Path& path) = 0;
|
||||
|
||||
virtual std::string readFile(const Path & path) = 0;
|
||||
virtual std::string readFile(const Path& path) = 0;
|
||||
|
||||
virtual std::string readLink(const Path & path) = 0;
|
||||
virtual std::string readLink(const Path& path) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue