Lines Matching refs:file
56 status_t Process(int file)
60 fFile = file;
124 fprintf(stderr, "Could not stat file \"%s\": %s\n", entry.path.c_str(),
134 int file = open(entry.path.c_str(), O_RDONLY);
135 if (file < 0) {
136 fprintf(stderr, "Could not open file \"%s\": %s\n", entry.path.c_str(),
141 status_t status = gSHA.Process(file);
163 fprintf(stderr, "usage: %s <hash-file>\n", kProgramName);
176 // read files from hash file
178 int file = open(hashFileName, O_RDONLY);
179 if (file < 0) {
180 fprintf(stderr, "%s: Could not open hash file \"%s\": %s\n",
186 read(file, buffer, 4);
188 fprintf(stderr, "%s: \"%s\" is not a hash file\n",
190 close(file);
195 read(file, &fileCount, sizeof(int));
202 read(file, &length, sizeof(int));
203 lseek(file, length + 1, SEEK_CUR);
206 // Read file names and their hash
208 read(file, &fileCount, sizeof(int));
209 TRACE("Found %d file(s)\n", fileCount);
213 read(file, entry.hash, SHA_DIGEST_LENGTH);
214 read(file, &entry.node, sizeof(ino_t));
217 read(file, &length, sizeof(int));
218 read(file, buffer, length + 1);
225 close(file);
237 "file.\n", gFiles.size(), runtime / 1000000.0,