.NET Framework Class Library
File.FileCopy Method

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > .NET API > MwPDMApi Namespace > File Class > File Methods >

.NET Framework Class Library
File.FileCopy Method

Allows the execution of a FileCopy with administrative privileges, when needed.

Namespace: MwPDMApi
Assembly:  MwPDMApi (in MwPDMApi.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

Visual Basic

Public Function FileCopy ( _

sourcePath As String, _
destinationPath As String, _
canOverWrite As Boolean, _
Optional useDBWServer As Boolean = False _
) As Boolean

C#

public bool FileCopy(

string sourcePath,
string destinationPath,
bool canOverWrite,
bool useDBWServer = false
)

Visual C++

public:

bool FileCopy(
String^ sourcePath,
String^ destinationPath,
bool canOverWrite,
bool useDBWServer = false
)

JavaScript

function fileCopy(sourcePath, destinationPath, canOverWrite, useDBWServer);

Parameters

sourcePath

Type: System.String
the file that will be copied

destinationPath

Type: System.String
the destination file

canOverWrite

Type: System.Boolean
if true, allows the overwriting of the destination file, otherwise don't overwrite destination file

useDBWServer (Optional)

Type: System.Boolean
Optional. If true, converts the from and to into UNC paths, then performs the file copy with administrative priviledges by using DBWServer, otherwise do nothing

Return Value

TRUE if the command succedeed, FALSE otherwise

Remarks

See Also

File Class

File Members

MwPDMApi Namespace