Lines Matching refs:FileData
34 } FileData;
36 // Initializer value for a FileData instance.
40 // Return true iff a |fileData| is empty.
41 static inline bool fileData_isEmpty(const FileData* fileData) {
42 return fileData->size == 0;
45 // Returns true iff |fileData| is valid. Used for unit-testing.
46 bool fileData_isValid(const FileData* fileData);
48 // Initialize a FileData value to the empty value.
49 void fileData_initEmpty(FileData* fileData);
51 // Initialize a FileData value by reading the content of a given file
52 // at |filePath|. On success, return 0 and initializes |fileData| properly.
53 // On failure, return -errno code, and set |fileData| to FILE_DATA_INIT.
54 int fileData_initFromFile(FileData* fileData, const char* filePath);
56 // Initialize a FileData by copying a memory buffer.
57 // |fileData| is the address of the FileData value to initialize.
59 // into the FileData.
62 int fileData_initFromMemory(FileData* fileData,
66 // Copy a FileData value into another one. This copies the contents in
68 int fileData_initFrom(FileData* fileData, const FileData* other);
70 // Swap two FileData values.
71 void fileData_swap(FileData* fileData, FileData* other);
73 // Finalize a FileData value. This releases the corresponding memory.
74 void fileData_done(FileData* fileData);