Commit Graph

54 Commits

Author SHA1 Message Date
Elliot Nunn
fb493a154f Dump files to native FS more consistently
Specifically:

- A data fork dump file will always exist
- A resource fork dump file will exist iff there are any bytes in that
  fork (but this dump file may be empty)
- A Finder info dump will exist if there are any nonzero bytes in the
  type or creator code
2019-08-18 21:37:51 +08:00
Elliot Nunn
51a0f8e68e Imitate os.walk(), nicer than iter.paths() 2019-01-12 20:37:27 +08:00
Elliot Nunn
d2a0fc36ff Fail or warn about unsyncable files
Filenames that MacOS sees as ending with .rdump or .idump are reserved
for resource fork and Finder info dumps. They are ignored on the HFS
side and complained about on the local side. This also applies to files
named underscore (_), which are reserved for directory Finder info.

Dotfiles are ignored on both sides (but warned about on the HFS side) to
make some modern tooling invisible to the MacOS.
2019-01-12 19:38:40 +08:00
Elliot Nunn
2d99623911 Display correct minimum disk size 2019-01-12 18:32:58 +08:00
Elliot Nunn
a5b3a5823d Update deprecated import 2019-01-12 18:32:37 +08:00
Elliot Nunn
d3b0a52caf MakeHFS: terabytes
Turns out HFS images could be *big* (up to 2 TB)
2018-12-10 16:10:43 +08:00
Elliot Nunn
dbc950c5d6 Support output from MakeHFS to device files
Takes advantage of the 'sparse' feature to minimise writes (in all
cases).

Does some binary-search magic to find the size of a block device, on a
Unix-like OS from Apple that I will not name.

At some point this should be exported through the Python API.
2018-12-10 16:10:06 +08:00
Elliot Nunn
eb61c947de API: add 'sparse' option to Volume.write()
This will cause it to return a (bytes, num_free_bytes, bytes) tuple.
2018-12-10 16:07:34 +08:00
Elliot Nunn
1362dab2c0 Treat 'ttro' readme files as text 2018-12-10 16:04:52 +08:00
Elliot Nunn
da3091668e Readme: I got SimpleText's creator wrong! 2018-12-10 16:04:13 +08:00
Elliot Nunn
d4536441e2 Allow a folder to be synced to/from disk
Previously only Volume objects had read_folder and write_folder methods.
2018-12-09 15:20:59 +08:00
Elliot Nunn
b1af2b0353 Support System 7 (lowercase zsys) 2018-11-09 18:49:29 +08:00
Elliot Nunn
350f11b0c0 Refactor Make/DumpHFS into Python library 2018-11-06 08:41:06 +08:00
Elliot Nunn
34eecddc28 Bugfix for no-start-app case! 2018-11-06 08:38:26 +08:00
Elliot Nunn
3a94d52888 First production release 2018-11-06 07:29:22 +08:00
Elliot Nunn
6e06f328aa Test different alloc block sizes 2018-11-06 07:29:10 +08:00
Elliot Nunn
f6c715fcd7 Real documentation 2018-11-06 07:26:23 +08:00
Elliot Nunn
64a9cec5bd Neaten up bootability
Any folder with a ZSYS and a FNDR file is made bootable, by pasting the
names of those files in the boot blocks.
2018-11-06 00:45:50 +08:00
Elliot Nunn
8ae22ed428 Allow a custom (non-Finder) startup app 2018-11-05 23:47:28 +08:00
Elliot Nunn
240a746ab9 Allow bootability
Passed as arg to write(), on by default.
2018-11-05 23:47:28 +08:00
Elliot Nunn
bef9d1be1b Add scripts to convert to/from the native FS 2018-11-03 20:29:47 +08:00
Elliot Nunn
2a7fc8a8c4 Hide Desktop Database from readers
(Not sure of the wisdom of this move)
2018-11-03 20:29:00 +08:00
Elliot Nunn
cd433459d0 Throw clear out-of-space and bad-name exceptions 2018-10-23 17:51:37 +08:00
Elliot Nunn
48e04be236 Fix wheel-style distribution 2018-10-23 17:33:56 +08:00
Elliot Nunn
46314c4747 Create minimal Desktop Database
This contains no useful information, but prevents a lengthy search of
the volume at startup. Eventually this should be replaced with a real
desktop database.
2018-10-23 17:33:20 +08:00
Elliot Nunn
9819375497 Add a gitignore (phew) 2018-10-23 14:46:00 +08:00
Elliot Nunn
793fa1e44a Handle creation, mod and bkup dates consistently 2018-10-23 12:52:24 +08:00
Elliot Nunn
ddc8445771 Fix del keyword 2018-10-18 16:06:04 +08:00
Elliot Nunn
7d8a12fb7e Allow catalog file to cross 4+ extents 2018-10-18 14:05:15 +08:00
Elliot Nunn
67edf73321 Fix bug in B*-tree size calculation 2018-10-14 16:30:32 +08:00
Elliot Nunn
829d3a5189 Pad B*-tree files to the alloc block size
This bug was corrupting all volumes over 32 MB (i.e. with a block size
exceeding 512 bytes). Oops!
2018-10-14 10:09:01 +08:00
Elliot Nunn
925fd13cd3 Better str(File) 2018-10-14 09:21:04 +08:00
Elliot Nunn
ac4bedcf53 Add (disabled) code to test sort order 2018-10-14 09:11:09 +08:00
Elliot Nunn
968fdadf2b Better error message for long filenames 2018-10-14 09:01:40 +08:00
Elliot Nunn
a19c958bab Got setuptools working 2018-10-08 10:12:45 +08:00
Elliot Nunn
5dff862548 Better dumping 2018-10-08 09:46:19 +08:00
Elliot Nunn
eb847a97cd Read extents overflow file 2018-10-08 09:33:34 +08:00
Elliot Nunn
e3d3623de9 Use Unicode strings instead of bytes 2018-10-08 09:06:35 +08:00
Elliot Nunn
73f01d3e81 neaten up newlines 2018-10-08 08:20:03 +08:00
Elliot Nunn
6831bd52bb fix up imports etc 2018-10-08 08:18:30 +08:00
Elliot Nunn
4b336343d8 Prepare to package 2018-10-08 07:38:58 +08:00
Elliot Nunn
12cca25a70 setter for vol name 2018-10-07 23:52:57 +08:00
Elliot Nunn
854e8b987c neater and passing tests 2018-10-07 23:47:23 +08:00
Elliot Nunn
58bc5f6430 refactored 2018-10-07 23:12:21 +08:00
Elliot Nunn
3a65952861 ready to factor slightly 2018-10-07 22:24:57 +08:00
Elliot Nunn
0d09bae64e ready to add features 2018-10-07 22:11:08 +08:00
Elliot Nunn
82e9f98ed9 works!!! 2018-10-07 22:07:43 +08:00
Elliot Nunn
e4e2a68cd0 after getting mounting, before ripping out index nodes 2018-10-07 18:31:42 +08:00
Elliot Nunn
95e6097268 okay, still only works with hfsutils 2018-10-03 16:28:02 +08:00
Elliot Nunn
78bd2a03a2 saves file data correctly 2018-10-03 15:58:39 +08:00