Difference between revisions of "TFile.Copy"
(Created page with " '''''function Copy(const Source, Destination: string): Boolean''''' Source: a path to a file to copy Destination: a path to a file that should be created Result: Whenev...") |
m |
||
Line 4: | Line 4: | ||
Result: Whenever copy operation was successful or not | Result: Whenever copy operation was successful or not | ||
==Description== | ==Description== | ||
− | This function | + | This function copies Source file to Destination path. If either Source path or Destination path is out of script's sandbox, [[EAccessViolation]] exception is thrown. |
== Example == | == Example == |
Latest revision as of 16:17, 26 July 2013
function Copy(const Source, Destination: string): Boolean Source: a path to a file to copy Destination: a path to a file that should be created Result: Whenever copy operation was successful or not
Description
This function copies Source file to Destination path. If either Source path or Destination path is out of script's sandbox, EAccessViolation exception is thrown.
Example
begin
try
File.Copy('soldat.ini', 'soldat.ini.bak');
except
WriteLn('access to soldat.ini denied');
end;
end;