Copies an uploaded file to the specified location. Overwriting a file of the same name is allowed.
Namespace:
EasyAlgo.EAUploadAssembly: EasyAlgo.EAUpload (in EasyAlgo.EAUpload.dll)
Version: 1.3.0.0
Syntax
| C# |
|---|
public void CopyTo( string path, bool overwrite ) |
| Visual Basic (Declaration) |
|---|
Public Sub CopyTo ( _ path As String, _ overwrite As Boolean _ ) |
Parameters
- path
- Type: System..::.String
The path to copy an uploaded file.
- overwrite
- Type: System..::.Boolean
true if existing file can be overwritten; otherwise false.
Remarks
The path argument is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the application working directory (see also HttpRequest..::.PhysicalApplicationPath).
Exceptions
| Exception | Condition |
|---|---|
| System..::.ArgumentNullException | Thrown when the specified path is nullNothingnullptra null reference (Nothing in Visual Basic). |
| EasyAlgo.EAUpload..::.EAUploadException | Thrown if overwrite is falseFalsefalsefalse (False in Visual Basic) and the destination file already exists. |
| System..::.UnauthorizedAccessException | Thrown if ASP.NET process does not have write permissions to the specified path |
