App-CreateSparseFile
view release on metacpan or search on metacpan
should be virtually instantaneous.
This function is not exported.
Arguments ('*' denotes required arguments):
* interactive => *bool* (default: 1)
Whether or not the program should be interactive.
If set to false then will not prompt interactively and usually will
proceed (unless for dangerous stuffs, in which case will bail
immediately.
* name* => *str*
* overwrite => *bool* (default: 0)
Whether to overwrite existing file.
If se to true then will overwrite existing file without warning. The
default is to prompt, or bail (if not interactive).
* size* => *str*
Size (e.g. 10K, 22.5M).
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200
means OK, 4xx caller error, 5xx function error). Second element (msg) is
a string containing error message, or 'OK' if status is 200. Third
lib/App/CreateSparseFile.pm view on Meta::CPAN
cmdline_aliases => { s => {} },
req => 1,
pos => 1,
},
interactive => {
summary => 'Whether or not the program should be interactive',
schema => 'bool',
default => 1,
description => <<'_',
If set to false then will not prompt interactively and usually will proceed
(unless for dangerous stuffs, in which case will bail immediately.
_
},
overwrite => {
summary => 'Whether to overwrite existing file',
schema => 'bool',
default => 0,
description => <<'_',
If se to true then will overwrite existing file without warning. The default is
to prompt, or bail (if not interactive).
_
},
},
examples => [
{
argv => [qw/file.bin 30G/],
summary => 'Create a sparse file called file.bin with size of 30GB',
test => 0,
'x.doc.show_result' => 0, # to avoid having PWP:Rinci execute our function to get result
lib/App/CreateSparseFile.pm view on Meta::CPAN
This function is not exported.
Arguments ('*' denotes required arguments):
=over 4
=item * B<interactive> => I<bool> (default: 1)
Whether or not the program should be interactive.
If set to false then will not prompt interactively and usually will proceed
(unless for dangerous stuffs, in which case will bail immediately.
=item * B<name>* => I<str>
=item * B<overwrite> => I<bool> (default: 0)
Whether to overwrite existing file.
If se to true then will overwrite existing file without warning. The default is
to prompt, or bail (if not interactive).
=item * B<size>* => I<str>
Size (e.g. 10K, 22.5M).
=back
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code
script/create-sparse-file view on Meta::CPAN
C<*> marks required options.
=head2 Main options
=over
=item B<--name>=I<s>*
=item B<--no-interactive>
If set to false then will not prompt interactively and usually will proceed
(unless for dangerous stuffs, in which case will bail immediately.
=item B<--overwrite>
Whether to overwrite existing file.
If se to true then will overwrite existing file without warning. The default is
to prompt, or bail (if not interactive).
=item B<--size>=I<s>*, B<-s>
Size (e.g. 10K, 22.5M).
=back
=head2 Configuration options
( run in 2.519 seconds using v1.01-cache-2.11-cpan-6aa56a78535 )