FileSpec.Copy Method (String, Logic) | |
Make a copy of the file represented by this file specification.
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VOSystemClasses (in XSharp.VOSystemClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD Copy(
oFSTarget AS STRING,
lName AS LOGIC
) AS LOGIC
public virtual bool Copy(
string oFSTarget,
[DefaultParameterValueAttribute(false, 0)] bool lName
)
Request Example
View SourceParameters
- oFSTarget
- Type: String
The name of the target file, including an optional drive, directory, and extension. The file is created following operating system rules. - lName
- Type: Logic
Logical parameter. TRUE causes an auto-rename of the target file if a file conflict occurs during the copy. The default is FALSE.
Return Value
Type:
Logic
TRUE, if the file was successfully copied; otherwise, FALSE.
Examples
This example defines a file specification and then copies it to a target file:
1
2oFSSource := FileSpec{"c:\data\customer.dbf"}
3
4oFSSource:Copy("a:\custdata")
See Also