Download the PHP package homelan/acorn-disk without Composer
On this page you can find all versions of the php package homelan/acorn-disk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package acorn-disk
Acorn Disk
This package allows the reading of DFS and ADFS disk images.
Features
- PSR-4 autoloading compliant structure
- Unit-Testing with PHPUnit
- Disk Image can be read from files, or passed in as a string
Install
composer requre homelan/acorn-disk
Overview
The DfsReader class, allows files and metadata to be read from a DFS disk image stored in the .ssd format. In DFS directorys are not hierarchical like a modern fs, rather they can only exist as the top level, and dirnames can only be 1 char in length. Another querk of DFS is that the default dir is '$', and while on later filing systems for the 8-bit Acorn range '$' was the root of the filing system in DFS directorys are more like a file name prefix with '$' being the default.
The DfsReader class can work in two ways, it can directly read bits of the disk image as needed by opening a file handle on demand, or the entire disk can be read in as a string and passed to the DfsReader. The former is more efficent for lots of file access, while the later is more memory efficent.
The AdfsReader class, allows files and metadata to be read from a ADFS floppy disk images stored in the .adl format. ADFS filing systems are like modern filing systems, in that there is a hierarchical directory structure, with '$' being the root of the fs, and "." is the directory seporator. There are limits on the number of files per dir in ADFS
The AdfsReaderHD class, does the same as the AdfsReader class, only it reads hardisk images stored in the scsi.dat format used by Beebem.
DfsReader Usage
Creating a DfsReader Object to directly open a file on disk
Creating a DfsReader Object to read from a disk image held in a binary string
Once the DfsReader object exists a few simple methods can be used to read data from it.
Reads the title of the disk
Gets the catalogue of what is on the disk *CAT
e.g.
The the contents of a give file
e.g.
Stats a file
Test if a given path is a file or not
e.g.
Test if a given path is a file or not
AdfsReader Usage
Creating a AdfsReader Object to directly open a file on disk
Creating a AdfsReader Object to read from a disk image held in a binary string
Once the AdfsReader object exists a few simple methods can be used to read data from it.
Reads the title of the disk
Gets the catalogue of what is on the disk *CAT
e.g.
The the contents of a give file
e.g.
Stats a file
Test if a given path is a file or not
e.g.
Test if a given path is a file or not
AdfsReaderHD Usage
This operates exactly the same as the AdfsReader class only the constuctor is different, as it does not support reading the disk image from a binary string.
As that is a some what negative feature with the significantly larger disk image sizes involved.
$oDfs = new \HomeLan\Retro\Acorn\Disk\AdfsReaderHD('scsi0.dat');