mirror of
https://github.com/NixOS/nix
synced 2025-06-29 06:21:14 +02:00
* Flags to indicate how values are specified on the command line
(--hash, --file, --name).
This commit is contained in:
parent
5079ccb455
commit
85effedca3
4 changed files with 137 additions and 64 deletions
|
@ -1,3 +1,5 @@
|
|||
#include <vector>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
@ -44,7 +46,7 @@ static void dumpEntries(const string & path, DumpSink & sink)
|
|||
DIR * dir = opendir(path.c_str());
|
||||
if (!dir) throw SysError("opening directory " + path);
|
||||
|
||||
Strings names;
|
||||
vector<string> names;
|
||||
|
||||
struct dirent * dirent;
|
||||
while (errno = 0, dirent = readdir(dir)) {
|
||||
|
@ -56,7 +58,7 @@ static void dumpEntries(const string & path, DumpSink & sink)
|
|||
|
||||
sort(names.begin(), names.end());
|
||||
|
||||
for (Strings::iterator it = names.begin();
|
||||
for (vector<string>::iterator it = names.begin();
|
||||
it != names.end(); it++)
|
||||
{
|
||||
writeString("entry", sink);
|
||||
|
@ -134,3 +136,8 @@ void dumpPath(const string & path, DumpSink & sink)
|
|||
|
||||
writeString(")", sink);
|
||||
}
|
||||
|
||||
|
||||
void restorePath(const string & path, ReadSource & source)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue