Giter Club home page Giter Club logo

disko's Introduction

Disko: A Disk Image Editor

go-versions platforms

I've recently gotten into retro computing and found I need to create disk images. I also wanted to learn Go, so I figured I could kill two birds with one stone and create a tool for doing this, written in Go.

You'll notice that there are a lot of ancient disk formats here, and nothing more modern like extfs. This is deliberate; I need this for my retro computing projects, so a lot of this is of no interest to anyone except those in the retro community.

Why the name? Disk + Go -> DiskGo -> Disko. Obviously.

API

Disko's Driver type requires a file system implementation with a minimal interface. For details on the functions that need to be implemented, see DriverImplementation in api.go.

Symbols

  • ✔: Supported
  • ⚠: Partial implementation, see notes
  • ✘: Doesn't make sense for this, so the function deliberately wasn't implemented.

Optional Features

Implementations of file systems may need to provide support for specific features. For convenience in the tables below, they are numbered thus:

  1. Directories
  2. File modes (Unix-style RWX)
  3. File ownership (Unix-style UID/GID)
  4. Timestamps
  5. Hard links
  6. Symbolic links

Base Driver

The base driver implements the following functions out of the box:

Function Support Required FS Features
Chdir 1
Chmod 2
Chown 3
Chtimes 4
Create  
Flush    
Getwd  
Lchown 3, 6
Link 5
Lstat  
Mkdir  
MkdirAll  
Open  
OpenFile  
ReadDir  
ReadFile  
Readlink  
Remove  
RemoveAll  
Rename    
SameFile  
Stat  
Symlink   6
Truncate  
Unmount    
Walk    
WriteFile  

Files

File handles support the following methods from os.File:

Function Support Required FS Features
Chdir 1
Chmod 2
Chown 3
Close  
Fd  
Name  
Read  
ReadAt  
ReadDir 1
Readdir 1
Readdirnames 1
ReadFrom  
Seek  
SetDeadline  
SetReadDeadline  
SetWriteDeadline  
Stat  
Sync  
SyscallConn  
Truncate  
Write  
WriteAt  
WriteString  
WriteTo  

File Systems

The following table shows the file systems that drivers exist (or are planned) for, as well as the status of the capabilities.

File System Introduced Format New Image Read Write Existing Files Create New Files Delete Files
Unix v1 [1] 1971        
Unix v2 1972          
Unix v5 1973          
CP/M 1.4 1974          
Unix v6 1975          
FAT 8 1977        
CP/M 2.2 1979          
Unix v7 1979          
FAT 12 1980          
CP/M 3.1 1983          
FAT 16 1984          
CP/M 4.1 [2] 1985          
MINIX 3 [3] 1987          
Unix v10 1989          
FAT 32 1996          
XV6 (maybe) 2006          

Legend:

  • ✔: Full support
  • B: Beta, largely stable, may contain bugs
  • A: Alpha, use at your peril

CLI Features

Feature Status
Create blank image  
List files  
Insert individual files  
Insert directory trees  
Remove individual files  
Remove using shell globs  
Remove trees  
Extract individual files  
Extract directory trees  
Extract using shell globs  
Interactive editing  

Development & Usage

I make the following guarantees:

  • Versioning strictly follows the guidelines in Go's documentation.
  • This is tested on:
    • The latest three minor versions of Go, e.g. if 1.19.x is the most recent release, I will test this on 1.17, 1.18, and 1.19.
    • The latest versions of Ubuntu, Windows, and MacOS that are supported by GitHub.

Further Reading

License

This is released under the terms of the Apache 2.0 License. Please see LICENSE.txt in this repository for the legal text.

Acknowledgments

This project uses open-source software built by other people, who have my gratitude for building things so that I don't have to. [4]

Footnotes

[1]Timestamps are stored according to the 1973 revision that uses the canonical Unix epoch. The first version of the specification can't represent timestamps past 1973-04-08 12:06:28.250.
[2]Also known as "DOS Plus".
[3]Note this is version 3 of the file system, not MINIX version 3.
[4]This should not be taken to imply that any of the people or organizations listed here endorse or are associated with this project. It's just a thank you.

disko's People

Contributors

dargueta avatar bijanvakili avatar

Watchers

Corey Prak avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.