ext2-0.1.0.0: A library for playing around with ext2. Might not work very well.

Copyright(C) 2015 Ricky Elrod
LicenseBSD2 (see LICENSE file)
MaintainerRicky Elrod <ricky@elrod.me>
Stabilityexperimental
Portabilitylens
Safe HaskellNone
LanguageHaskell2010

System.Ext2.Utility

Contents

Description

This module exports utility functions for working with ext2 after it has been parsed into Haskell types.

Synopsis

Utility functions

blockGroupCount :: Superblock -> Int

Get the number of block groups within the file system.

byteFromBlock :: Superblock -> Int -> Int

Given a Superblock, and the block number, get the byte number at which it starts.

Silly test/helper functions

getSuperblock :: String -> IO Superblock

Open an ext2 filesystem and parse out the Superblock.

getBGDT :: String -> IO BlockGroupDescriptorTable

Open an ext2 filesystem and parse out the BlockGroupDescriptorTable.

getAllTables :: ByteString -> (Superblock, BlockGroupDescriptorTable, Vector Inode)

Parses all tables out.

listRootFiles :: String -> IO [ByteString]

Lists names of all files in the root directory.