Difference between revisions of "File.copy"
From OpenEUO
(asian upskirt.net http://niyyae.xhost.ro/voyeur.web.html voyeur.web teen bunny.com http://niyyae.xhost.ro/amateur-blogs.net.html amateur blogs.net) |
(killspamm) |
||
Line 1: | Line 1: | ||
− | + | == Calling Pattern == | |
+ | Call | ||
+ | local f = sl.file(a,b) | ||
+ | local r = f.copy(c) | ||
− | + | Arguments | |
+ | c is a string, the target file name. | ||
− | + | Results | |
+ | r is a boolean denoting success or failure of copy operation. | ||
− | + | == Example Usage == | |
− | + | h = sl.file(getinstalldir()..'scripts/testread.dat', 'read') | |
+ | local r = h.copy(getinstalldir()..'scripts/testcopy.dat') | ||
+ | print(tostring(r)) | ||
+ | |||
+ | --> true | ||
+ | |||
+ | == Description == | ||
+ | |||
+ | The copy method copies the open file to the target filename. Returns true if successful. The current read cursor position is maintained. | ||
+ | |||
+ | == Upon Error == | ||
+ | |||
+ | If copy is unable to create the target file an error occurs and is handled according to the operant redirection settings. Any other error should cause copy to return false. | ||
+ | |||
+ | == See Also == | ||
+ | |||
+ | * [http://www.easyuo.com/openeuo/wiki/index.php/Simplelib simplelib] | ||
+ | |||
+ | * [[file]] | ||
+ | |||
+ | * [[file.readall]] | ||
+ | |||
+ | * [[file.readnext]] | ||
+ | |||
+ | * [[file.reopen]] |
Latest revision as of 18:31, 15 July 2012
Calling Pattern
Call
local f = sl.file(a,b) local r = f.copy(c)
Arguments
c is a string, the target file name.
Results
r is a boolean denoting success or failure of copy operation.
Example Usage
h = sl.file(getinstalldir()..'scripts/testread.dat', 'read') local r = h.copy(getinstalldir()..'scripts/testcopy.dat') print(tostring(r))
--> true
Description
The copy method copies the open file to the target filename. Returns true if successful. The current read cursor position is maintained.
Upon Error
If copy is unable to create the target file an error occurs and is handled according to the operant redirection settings. Any other error should cause copy to return false.