The Sleuth Kit  4.11.1
Macros | Functions
fs_dir.c File Reference

Create, manage, etc. More...

#include "tsk_fs_i.h"
#include "tsk_fatfs.h"

Macros

#define DIR_STRSZ   4096
 
#define MAX_DEPTH   128
 

Functions

uint8_t tsk_fs_dir_add (TSK_FS_DIR *a_fs_dir, const TSK_FS_NAME *a_fs_name)
 
TSK_FS_DIRtsk_fs_dir_alloc (TSK_FS_INFO *a_fs, TSK_INUM_T a_addr, size_t a_cnt)
 
void tsk_fs_dir_close (TSK_FS_DIR *a_fs_dir)
 Close the directory that was opened with tsk_fs_dir_open() More...
 
uint8_t tsk_fs_dir_contains (TSK_FS_DIR *a_fs_dir, TSK_INUM_T meta_addr, uint32_t hash)
 Test if a_fs_dir already contains an entry for the given meta data address. More...
 
uint8_t tsk_fs_dir_find_inum_named (TSK_FS_INFO *a_fs, TSK_INUM_T a_inum)
 
TSK_RETVAL_ENUM tsk_fs_dir_find_orphans (TSK_FS_INFO *a_fs, TSK_FS_DIR *a_fs_dir)
 
TSK_FS_FILEtsk_fs_dir_get (const TSK_FS_DIR *a_fs_dir, size_t a_idx)
 Return a specific file or subdirectory from an open directory. More...
 
const TSK_FS_NAMEtsk_fs_dir_get_name (const TSK_FS_DIR *a_fs_dir, size_t a_idx)
 Return only the name for a file or subdirectory from an open directory. More...
 
size_t tsk_fs_dir_getsize (const TSK_FS_DIR *a_fs_dir)
 Returns the number of files and subdirectories in a directory. More...
 
uint32_t tsk_fs_dir_hash (const char *str)
 
TSK_RETVAL_ENUM tsk_fs_dir_load_inum_named (TSK_FS_INFO *a_fs)
 
uint8_t tsk_fs_dir_make_orphan_dir_meta (TSK_FS_INFO *a_fs, TSK_FS_META *a_fs_meta)
 
uint8_t tsk_fs_dir_make_orphan_dir_name (TSK_FS_INFO *a_fs, TSK_FS_NAME *a_fs_name)
 
TSK_FS_DIRtsk_fs_dir_open (TSK_FS_INFO *a_fs, const char *a_dir)
 Open a directory (using its path) so that each of the files in it can be accessed. More...
 
TSK_FS_DIRtsk_fs_dir_open_meta (TSK_FS_INFO *a_fs, TSK_INUM_T a_addr)
 Open a directory (using its metadata addr) so that each of the files in it can be accessed. More...
 
uint8_t tsk_fs_dir_realloc (TSK_FS_DIR *a_fs_dir, size_t a_cnt)
 
void tsk_fs_dir_reset (TSK_FS_DIR *a_fs_dir)
 
uint8_t tsk_fs_dir_walk (TSK_FS_INFO *a_fs, TSK_INUM_T a_addr, TSK_FS_DIR_WALK_FLAG_ENUM a_flags, TSK_FS_DIR_WALK_CB a_action, void *a_ptr)
 Walk the file names in a directory and obtain the details of the files via a callback. More...
 
uint8_t tsk_fs_dir_walk_internal (TSK_FS_INFO *a_fs, TSK_INUM_T a_addr, TSK_FS_DIR_WALK_FLAG_ENUM a_flags, TSK_FS_DIR_WALK_CB a_action, void *a_ptr, int macro_recursion_depth)
 

Detailed Description

Create, manage, etc.

the TSK_FS_DIR structures.

Function Documentation

uint8_t tsk_fs_dir_contains ( TSK_FS_DIR a_fs_dir,
TSK_INUM_T  meta_addr,
uint32_t  hash 
)

Test if a_fs_dir already contains an entry for the given meta data address.

If so, return the allocation state.

Returns
TSK_FS_NAME_FLAG_ALLOC, TSK_FS_NAME_FLAG_UNALLOC, or 0 if not found.

References TSK_FS_NAME::flags, TSK_FS_NAME::meta_addr, TSK_FS_NAME::name, TSK_FS_DIR::names, TSK_FS_DIR::names_used, and TSK_FS_NAME_FLAG_ALLOC.


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.