std1.0.0-beta-7 SafeC docs

std :: fs::ext

Struct std::Ext2Ctx

#include <std/fs/ext.h> source

struct Ext2Ctx {
    struct BlockDevice dev;
    struct Ext2Super super;
    unsigned long block_size;
    unsigned long inodes_per_group;
    unsigned long blocks_per_group;
    unsigned long group_count;
}

Fields

§struct Ext2Super supersource
§unsigned long block_sizesource
§unsigned long inodes_per_groupsource
§unsigned long blocks_per_groupsource
§unsigned long group_countsource

Methods

Initialise this context in place from a block device (copied into dev). Returns 0 on success.

§int read_block(unsigned long block_no, []unsigned char buf)source · definition

Read block block_no into the first block_size bytes of buf (-1 if it is shorter).

§int read_inode(unsigned long ino, &Ext2Inode inode_out)source · definition

Read inode ino into inode_out. Returns 0 on success.

§unsigned long read_file(unsigned long ino, unsigned long offset, []unsigned char buf)source · definition

Read up to buf.len bytes of inode ino's data at byte offset.

§int open(const &char path, int flags, &VfsNode node_out)source · definition
§unsigned long read(unsigned long inode, unsigned long offset, []unsigned char buf)source · definition
§generic<T> int readdir(unsigned long inode, fn void(&VfsNode, ?&T) cb, ?&T user)source · definition