copy

From DavinciWiki
Jump to: navigation, search


Description

copy data from one location to another

Arguments and Return Values

Arguments: A string containing the path of the source file

Return Value: A string containing the path of the destination file or directory

Usage

Syntax: copy(source = STRING, destination = STRING [, force = BOOL])

source is the source file

destination is the destination file or directory

force same usage as read (1 is overwrite, 0 is do not overwrite)

Also works with remote files...see the example below

Examples

Local file load:

dv> copy("/u/cedwards/tmp.txt","/u/cedwards/tmp2.txt")
"/u/cedwards/tmp2.txt"

Remote URL copy (like wget):

dv> copy("http://www.mars.asu.edu/~cedwards/mos/acidalia/acidalia-nightir.png","/u/cedwards")
Downloading...................done.
"/u/cedwards/acidalia-nightir.png"

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Recent Core Changes

Modified On: 06-30-2009

Personal tools