/* */ #ifndef _D_FALLOC_FILE_ALLOCATION_ITERATOR_H_ #define _D_FALLOC_FILE_ALLOCATION_ITERATOR_H_ #include "FileAllocationIterator.h" #include "BinaryStream.h" namespace aria2 { // Allocate disk space using posix_fallocate() system call. class FallocFileAllocationIterator:public FileAllocationIterator { private: BinaryStream* stream_; off_t offset_; uint64_t totalLength_; public: FallocFileAllocationIterator(BinaryStream* stream, off_t offset, uint64_t totalLength); virtual void allocateChunk(); virtual bool finished(); virtual off_t getCurrentLength(); virtual uint64_t getTotalLength(); }; } // namespace aria2 #endif // _D_FALLOC_FILE_ALLOCATION_ITERATOR_H_