Lines Matching defs:file_descriptor
44 FILE* file_descriptor = fopen(filename.c_str(), "wb");
45 if (!file_descriptor) {
48 fwrite(data.c_str(), 1, data.size(), file_descriptor);
49 fclose(file_descriptor);
53 FILE* file_descriptor = fopen(filename.c_str(), "r");
55 if (!file_descriptor) {
60 fseek(file_descriptor, 0L, SEEK_END);
61 int num_bytes = ftell(file_descriptor);
65 fseek(file_descriptor, 0L, SEEK_SET);
69 file_descriptor);
75 fclose(file_descriptor);