Skip to content
Sasha Crofter edited this page Jun 24, 2012 · 9 revisions

CAT

CAT is the default file system for cubeOS. It is based on the Harry's Allocation Table file system format. cubeOS uses hashes to identify links, in addition to fourteen character strings.

requires

  • crypt

STILL UNDER HEAVY DEVELOPMENT. DO NOT USE

High-level Commands

The high-level commands provide a smooth interface with the filesystem that can be used easily by modules and the rest of the operating system.

Low-level Commands

The low-level commands are used by the high level commands to provide fast and efficient access to the framework of the filesystem itself.

cat.mountSystem (location, length, sectorSize)

Mounts / directory at location, reserving length words after it. It then initializes a cat filesystem with the given sectorSize.

Currently unsafe if the number of sectors is greater than 16 returns location of first word in header

cat.getOpenSector ()

Finds the first open sector in the filesystem modifies A returns sector number

cat.getSectorPointer (sector)

modifies A returns a pointer to the location of the given sector in memory

cat.newInode (sector, type)

Creates a new inode of type and length 0 at sector. It also marks the corresponding sector in sector map as used. Types are 0, for unused, 1, for directory, and 2, for file. modifies A, B returns sector of inode

cat.newLink (sector, targetSector, namePointer)

Creates a new link under the given sector, extending the length of the inode automatically and overflowing to the next open sector (updating sector usage and linking) if necessary. The first word is the targetSector, and the remaining fifteen words are copied literally (maximum length fourteen) from the null-terminated word at namePointer. returns 0 if successful, and 1 if the given sector does not contain a directory

Clone this wiki locally