Mercurial > octave-antonio
diff scripts/miscellaneous/gzip.m @ 19258:a4e993343e93
Overhaul the archive family (bzip2, gzip, zip, tar) of m-files.
* NEWS: Announce changes to archive family of functions.
* bunzip2.m: Redo docstring. Use common variable names between docstring and
function. Remove file from test statistics. Default to placing uncompressed
files in same directory as the compressed one.
* bzip2.m: Redo docstring. Use common variable names between docstring and
function. Add extensive BIST test.
* gunzip.m: Redo docstring. Use common variable names between docstring and
function. Remove file from test statistics. Default to placing uncompressed
files in same directory as the compressed one.
* gzip.m: Redo docstring. Remove input validation test that is no longer
applicable.
* __xzip__.m: Create output directory if it is named, but does not yet exist.
Check return code of mkdir and issue an error if it is unsuccesful. Use the
caller's name (gzip or bzip2) in error messages. Rename subfunction myfileparts
to fname_only for slightly more clarity. Add FIXME note that compression of
directories does not work.
* tar.m: Redo docstring. Use common variable names between docstring and
function. Add extensive BIST test.
* untar.m: Redo docstring. Use common variable names between docstring and
function. Remove file from test statistics. Default to placing uncompressed
files in same directory as the compressed one.
* unzip.m: Redo docstring. Use common variable names between docstring and
function. Remove file from test statistics. Default to placing uncompressed
files in same directory as the zip archive.
* zip.m: Redo docstring. Use common variable names between docstring and
function. Add extensive BIST test.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 17 Oct 2014 10:45:25 -0700 |
parents | 91a6f06c5052 |
children | cbce5d1bcaf9 |
line wrap: on
line diff
--- a/scripts/miscellaneous/gzip.m Fri Oct 17 09:29:10 2014 +0200 +++ b/scripts/miscellaneous/gzip.m Fri Oct 17 10:45:25 2014 -0700 @@ -21,16 +21,20 @@ ## @deftypefnx {Function File} {@var{filelist} =} gzip (@var{files}, @var{dir}) ## Compress the list of files and directories specified in @var{files}. ## -## @var{files} is a character array or cell array of strings. Each file is -## compressed separately and a new file with a @file{".gz"} extension is -## created. The original files are not modified, but, existing compressed -## files will be silently overwritten. If a directory is specified then -## @code{gzip} recursively compresses all files in the directory. +## @var{files} is a character array or cell array of strings. Shell +## wildcards in the filename such as @samp{*} or @samp{?} are accepted and +## expanded. Each file is compressed separately and a new file with a +## @file{".gz"} extension is created. The original files are not modified, +## but existing compressed files will be silently overwritten. If a directory +## is specified then @code{gzip} recursively compresses all files in the +## directory. ## -## If @var{dir} is defined the compressed files are placed in this directory. +## If @var{dir} is defined the compressed files are placed in this directory, +## rather than the original directory where the uncompressed file resides. +## If @var{dir} does not exist it is created. ## ## The optional output @var{filelist} is a list of the compressed files. -## @seealso{gunzip, bzip2, zip, tar, unpack} +## @seealso{gunzip, unpack, bzip2, zip, tar} ## @end deftypefn function filelist = gzip (varargin) @@ -85,6 +89,5 @@ %!error gzip () %!error gzip ("1", "2", "3") -%!error <output directory does not exist> gzip ("1", tempname) %!error <FILES must be a character array or cellstr> gzip (1)