copy - Use to copy file.
copy([append:true|false,create:true|false,error:variabl]"src filename", "dst filename");
copy([append:true|false,create:true|false,error:variabl]src:"src filename", dst:"dst filename");
This function is used to copy a source file to a destination file.
If Append is true and destination exist, it will append to the file.
If create is false and destination file does not exist, the file won't be created.
File are copied from the root of the file system.
The root of the filesystem is defined in the configuration file. See ExtensoConfig for more information.
res=<{ copy("a", "b"); }>. return .*open src.*)); res=<{ copy(create:false, "c1", "b"); }>. return .*stat dst .* res=<{ copy(append:false, "/tests/c1", "/tests/c2"); size("/tests/c1") == size("/tests/c2"); }>. return res=true. res=<{ copy(src:"/tests/c1", "/tests/c2"); 2*size("/tests/c1") == size("/tests/c2");}>. return res=true. res=<{ copy(src:"/tests/c1", dst:"/tests/c2"); 3*size("/tests/c1") == size("/tests/c2");}>. return res=true. res=<{ copy(append:false,src:"/tests/c1", dst:"/tests/c2"); size("/tests/c1") == size("/tests/c2");}>. return res=true. res=<{ copy(create:false,src:"/tests/c1", dst:"/tests/c3"); size("/tests/c1") == size("/tests/c2");}>. return .*stat dst.*
Written by Pierre Laplante, <laplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com