diff --git a/ProDOS.pm b/ProDOS.pm index ca9b6c3..8da4a6b 100644 --- a/ProDOS.pm +++ b/ProDOS.pm @@ -2151,5 +2151,18 @@ sub unlock_file { return 1; } +# +# Create a subdirectory. +# +sub create_subdir { + my ($pofile, $subdirname, $dbg) = @_; + + $debug = 1 if defined $dbg && $dbg; + + print "pofile=$pofile subdirname=$subdirname\n" if $debug; + + return 1; +} + 1; diff --git a/README b/README index 74dd3a2..8b69321 100644 --- a/README +++ b/README @@ -10,4 +10,5 @@ prodelete.pl -- nearly working prolock.pl -- partially working prounlock.pl -- partially working procopy.pl -- started +procreate.pl -- diff --git a/procreate.pl b/procreate.pl new file mode 100644 index 0000000..ccfe8f8 --- /dev/null +++ b/procreate.pl @@ -0,0 +1,33 @@ +#!/usr/bin/perl -w + +# +# procreate.pl: +# +# Utility to create a subdirectory on an Apple II ProDOS .po disk image. +# +# 20190305 LSH +# + +use strict; + +use ProDOS; + +my $debug = 0; + +while (defined $ARGV[0] && $ARGV[0] =~ /^-/) { + # Debug + if ($ARGV[0] eq '-d') { + $debug = 1; + shift; + } else { + die "Unknown command line argument $ARGV[0]\n"; + } +} + +my $pofile = shift or die "Must supply .po filename\n"; +my $subdirname = shift or die "Must supply subdirectory name (on disk image)\n"; + +create_subdir($pofile, $subdirname, $debug); + +1; +