dissect.fat#

Submodules#

Package Contents#

Classes#

exception dissect.fat.BadClusterError#

Bases: Error

Common base class for all non-exit exceptions.

exception dissect.fat.EmptyDirectoryError#

Bases: Error

Common base class for all non-exit exceptions.

exception dissect.fat.Error#

Bases: Exception

Common base class for all non-exit exceptions.

exception dissect.fat.FileNotFoundError#

Bases: Error

Common base class for all non-exit exceptions.

exception dissect.fat.FreeClusterError#

Bases: Error

Common base class for all non-exit exceptions.

exception dissect.fat.InvalidBPB#

Bases: Error

Common base class for all non-exit exceptions.

exception dissect.fat.InvalidDirectoryError#

Bases: Error

Common base class for all non-exit exceptions.

exception dissect.fat.InvalidHeaderMagic#

Bases: Error

Common base class for all non-exit exceptions.

exception dissect.fat.LastEmptyDirectoryError#

Bases: Error

Common base class for all non-exit exceptions.

exception dissect.fat.NotADirectoryError#

Bases: Error

Common base class for all non-exit exceptions.

class dissect.fat.ExFAT(fh)#
cluster_to_sector(cluster)#

Returns the clusters’ corresponding sector address

Parameters:

cluster (int) – cluster address

Returns:

corresponding sector address if available

Return type:

int

sector_to_cluster(sector)#

Returns the sectors’ corresponding cluster address

Parameters:

sector (int) – sector address

Returns:

corresponding cluster address if available

Return type:

int

runlist(starting_cluster, not_fragmented=True, size=None)#

Creates a RunlistStream compatible runlist from exFAT FAT structures

Parameters:

starting_cluster (int) – First cluster of file, folder or location in question

Returns:

[(sector_offset, run_length)]

Return type:

runlist

get_cluster_chain(starting_cluster)#

Reads the on disk FAT to construct the cluster chain

Parameters:

starting_cluster (int) – cluster to look-up the chain from

Returns:

Chain of clusters. Including starting_cluster

Return type:

list

class dissect.fat.FATFS(fh, encoding='ibm437')#
get(path, dirent=None)#