/* */ #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_; int64_t offset_; int64_t totalLength_; public: FallocFileAllocationIterator(BinaryStream* stream, int64_t offset, int64_t totalLength); virtual void allocateChunk(); virtual bool finished(); virtual int64_t getCurrentLength(); virtual int64_t getTotalLength(); }; } // namespace aria2 #endif // D_FALLOC_FILE_ALLOCATION_ITERATOR_H