1 #ifndef FILE_SET_SIZE_H 2 #define FILE_SET_SIZE_H 3 4 /* Shrink/grow file. If file is grown, the new data is guaranteed to 5 be zeros. The file offset may be anywhere after this call. 6 Returns -1 if failed, 0 if successful. */ 7 int file_set_size(int fd, off_t size); 8 /* Preallocate file to given size, without actually changing the size 9 reported by stat(). Returns 1 if ok, 0 if not supported by this filesystem, 10 -1 if error. */ 11 int file_preallocate(int fd, off_t size); 12 13 #endif 14