Classic Macintosh MPW tool for file synchronization
Go to file
Dietrich Epp 912c13f193 Add README for SyncFiles
GitOrigin-RevId: fc9eef02792debc4929a47830ac534d4c1c4515d
2021-03-17 21:05:19 -04:00
gen Add flags for debugging charset conversion tables 2021-03-17 21:05:18 -04:00
.clang-format Clang format 2021-03-17 21:01:02 -04:00
defs.h Fix incorrect types for vRefNum and parID 2021-03-17 21:05:18 -04:00
file.c Fix incorrect types for vRefNum and parID 2021-03-17 21:05:18 -04:00
mac_from_unix_data.h Begin SyncFiles pull implementation 2021-03-17 21:01:04 -04:00
mac_from_unix.c Fix UTF-8 to Macintosh charset conversion 2021-03-17 21:05:19 -04:00
mac_to_unix.c Begin SyncFiles pull implementation 2021-03-17 21:01:04 -04:00
Makefile Update makefile dependencies 2021-03-17 21:05:19 -04:00
README.md Add README for SyncFiles 2021-03-17 21:05:19 -04:00
sync.c Use temporary directory on correct volume 2021-03-17 21:05:18 -04:00
util.c Refactor SyncFiles 2021-03-17 21:05:17 -04:00

SyncFiles

SyncFiles is a tool for MPW (Macintosh Programmers Workshop) which synchronizes files between a Macintosh and Unix system. It is used to copy files between a classic Macintosh development environment (e.g. MPW running on Mac System 7) and a modern Unix environment (e.g. a Basilisk II host system or an AppleShare volume).

What SyncFiles Does

  • By default, only copies files which are newer than the destination file (unless -force is specified). This means that your classic Macintoshs system should have the clock set correctly!

  • Sets the modification timestamp of the destination file to match the timestamp of the source file.

  • Only synchronizes files which match hard-coded patterns: copies the Makefile and any files matching *.c, *.h, or *.r.

  • Converts files to UTF-8 and LF line endings for Unix systems; converts to Mac OS Roman and CR line endings for Macintosh systems.

  • Creates Macintosh files with MPW Shell creator code and text file type.

Limitations

There is a hard-coded maximum file size of 64 KiB.

Usage

Operates in push or pull mode. The tool runs from inside the classic Macintosh environment, so the “push” mode copies from Macintosh to Unix, and the “pull” mode copies from Unix to Macintosh. It is assumed that the Macintosh directory is on a normal disk volume.

Basic Usage

To push files from the current directory,

SyncFiles <DestPath> -push

To pull files from the current directory,

SyncFiles <DestPath> -pull

Other Flags

  • -verbose: Print lots of boring messages.

  • -quiet: Print only errors and warnings.

  • -force: Ignore timestamps, copy all source files to destination.

  • -dry-run: Perform no actions, just print out what would be done.

  • -dir: Specify an alternat Macintosh directory to push from or pull to. By default, pushes from and pulls to the current directory.

  • -delete: Delete files in destination which are missing from source.