/* * Copyright 2008, Haiku, Inc. * Distributed under the terms of the MIT License. * * Authors: * François Revol */ #include "CachedBlock.h" #include "Stream.h" #include "Directory.h" #include "File.h" #include #include #include #include using namespace FATFS; CachedBlock::CachedBlock(Volume &volume) : fVolume(volume), fBlockNumber(-1LL), fBlock(NULL) { } CachedBlock::CachedBlock(Volume &volume, off_t block) : fVolume(volume), fBlockNumber(-1LL), fBlock(NULL) { SetTo(block); } CachedBlock::~CachedBlock() { free(fBlock); }