Work on file writing

This commit is contained in:
Leeland Heins 2019-03-05 08:21:19 -06:00 committed by GitHub
parent 899a8f268e
commit ae350a2bf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1027,6 +1027,21 @@ sub get_ind_blk {
return @blocks;
}
#
# Find empty file descriptive entry slot.
#
sub find_empty_fdescent {
my ($pofile, $subdir, $dbg) = @_;
if (! defined $subdir || $subdir eq '') {
# Must find a slot in the master directory.
print "Master directory\n";
} else {
# If subdir not found then bag out.
print "Subdirectory $subdir\n";
}
}
#
# Find a file
#
@ -1531,7 +1546,16 @@ sub write_file {
return 0;
}
my $subdir = '';
my $apple_fname = $apple_filename;
if ($apple_filename =~ /^[\/]*([^\/]+)\/(\S+)$/) {
$subdir = $1;
$apple_fname = $2;
}
print "subdir=$subdir apple_fname=$apple_fname\n";
# Find an empty file descriptive entry in the proper subdirectory.
find_empty_fdescent($pofile, $subdir, $debug);
##FIXME
# May need to add a subdirectory block if the directory is full.
##FIXME