The Sleuth Kit 4.15.0-develop
TskFsBlock Class Reference

Stores information about a file system block. More...

#include <tsk_fs.h>

Public Member Functions

TSK_DADDR_T getAddr () const
const char * getBuf () const
TSK_FS_BLOCK_FLAG_ENUM getFlags () const
uint8_t open (TskFsInfo *a_fs, TSK_DADDR_T a_addr)
 TskFsBlock ()
 default constructor to construct a TskFsBlock.
 TskFsBlock (const TSK_FS_BLOCK *a_fsBlock)
 construct a TskFsBlock using a TSK_FS_BLOCK structure
 ~TskFsBlock ()

Detailed Description

Stores information about a file system block.

Must be created by either allocating an empty block and opening one or by passing in a TSK_FS_BLOCK struct. If NULL is passed to the constructor and open() is not called, the other methods return undefined data. See TSK_FS_BLOCK for more details.

Constructor & Destructor Documentation

◆ TskFsBlock() [1/2]

TskFsBlock::TskFsBlock ( const TSK_FS_BLOCK * a_fsBlock)
inline

construct a TskFsBlock using a TSK_FS_BLOCK structure

Parameters
a_fsBlocka pointer of TSK_FS_BLOCK. If NULL, the getX() methods return undefined data.

◆ TskFsBlock() [2/2]

TskFsBlock::TskFsBlock ( )
inline

default constructor to construct a TskFsBlock.

Must call open() before using other methods.

◆ ~TskFsBlock()

TskFsBlock::~TskFsBlock ( )
inline
Free the memory associated with the TSK_FS_BLOCK structure.

See tsk_fs_block_free() for details

References tsk_fs_block_free().

Member Function Documentation

◆ getAddr()

TSK_DADDR_T TskFsBlock::getAddr ( ) const
inline
Get address of block
Returns
address of block

◆ getBuf()

const char * TskFsBlock::getBuf ( ) const
inline
Get buffer with block data (of size TSK_FS_INFO::block_size)
Returns
buffer with block data

◆ getFlags()

TSK_FS_BLOCK_FLAG_ENUM TskFsBlock::getFlags ( ) const
inline
Get flags for block (alloc or unalloc)
Returns
flags for block

◆ open()

uint8_t TskFsBlock::open ( TskFsInfo * a_fs,
TSK_DADDR_T a_addr )
inline
Open a block (use only if created with default constructor).
Parameters
a_fsThe file system to read the block from.
a_addrThe file system address to read.
Returns
1 on error and 0 on success.

The documentation for this class was generated from the following file:

Copyright © 2007-2020 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.