Class TapeArchive::File::WriteOnlyFile
|
|
This class represents a tar file that may be written to, but not queried.
ParameterValidator
Open the given file in "write-only" mode. If a block is given,
pass the new file to the block, execute the block, and then close the file.
Otherwise, return the file.
Open the given file in "write-only" mode, for appending. If a
block is given, pass the new file to the block, execute the block, and then
close the file. Otherwise, return the file.
Initialize a new write-only tar file reference. If ‘appending’
is true, then the file is opened for appending and the file pointer is
moved to the end of the last valid block. If the file does not exist, it is
created. If it does exist and the file is not opened for append, the file
is truncated.
Execute the given block using instance_eval
Create a new entry with the given filename and arguments. Return the new
entry.
Write the given string to the current entry. If there is no current entry,
raise an exception.
This method is also aliased as
print
Write the given string to the current entry, appending a newline.
Close the current file, padding it out to a multiple of 20 blocks (the tar
default).