Archive
tar_create
tar_create( file, file_loc, dir, dir_loc, flags )
Creates a compressed Unix style tar file.
Return 1 on success 0 on failure
file = target output file
location = location of the output file - 'data' or 'script'
dir = source directory to create a tarball of
dir_loc = location of the source file - 'data' or 'script' defaulting to data
flags = may be an empty string or 'compress' which will cause the output .tar file to be bzip2 encoded.
tar_directory
tar_directory( file, location, desc var )
Return information about a tar file.
Number of files in output array, 0 on error
filepath = File name and path within the location
location = Either "script" or "data". Anything else defaults to "data".
desc (out) = An array of structures, one array element for each item in the tar file, with the following members assigned:
NAME: Text
tar_extract
tar_extract( file, file_loc, dir, dir_loc )
Unpacks a tar file to a specified directory.
Returns 1 on success 0 on failure
file = the path and file name
tar_location = source 'data' or 'script'
dir = destination directory to extract the tar file to
dir_location = destination 'data' or 'script'
wdownload
wdownload( url, filepath, location, callback, callbackdata var )
Downloads and stores a file from a URL. Acts as a front end to wget()
Returns -1 if fails, returns the server response code: Possible examples 200 = success, 301 = moved, 404 = not found.
url = file to retrieve
filepath = where destination file should be stored
location = destination 'data' or 'script'.callback_fn = the name of a callback function in current Miva Script file
callback_fn( size, total, data var ): a user defined user function that returns 1 to continue, 0 to abort.
callbackdata var = opaque data that is passed as the data parameter to each call of callback_fn
wget
wget( url, filepath, location )
Downloads and stores a file from a URL. Note: If an error occurs, the error message will be stored instead.
Returns -1 if fails, returns the server response code: Possible examples 200 = success, 301 = moved, 404 = not found.
url = file to retrieve
filepath = where destination file should be stored
location = destination 'data' or 'script'.
User Annotations:
archive
-- Other Annotations --
topic archive
topic blowfish
topic comments
topic file-uploading
topic filesystem-both
topic inspection
topic loops
topic math
topic operators
topic resources
topic time
topic user-examples
topic variables
item acos
item asciichar
item dir
item file_create
item gdImageStringFT
item gettoken
item glosub
item indexof
item int
item miva_array_find
item miva_array_insert
item miva_array_sort
item miva_hex_decode
item miva_hex_encode
item miva_struct_members
item miva_template_compile
item miva_variable_value
item miva_writelog
item MvCALL
item MvFOREACH
item MvREVEALSTRUCTURE
item MvSMTP
item substring
item time_t_dayofmonth
item tokenize
item xml_parse_set_colon_replacement
The callbackdata is a variable passed by reference to the callback function (the "data" parameter) each time it is called. Useful for maintaining context between each call of the callback function.
Next »
« Previous