ZipArchive.Move Method
Namespace: Rebex.IO.Compression
Assembly: Rebex.Zip.dll (version 7.0.9313)
Move(String, String)
Moves or renames an archive item (file or directory).
Declaration
public void Move(string fromPath, string toPath)
Parameters
| Type | Name | Description |
|---|---|---|
| String | fromPath | Original path to a ZIP archive item to move or rename. |
| String | toPath | New path to move or rename the ZIP archive item to. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | The specified path is null. |
| ArgumentException | The specified path is empty or contains invalid characters. -or- Attempt to move or rename the root directory of the archive. |
| InvalidOperationException | Archive is not opened for writing. |
| ObjectDisposedException | Archive was already disposed. |
| PathTooLongException | New path is too long (longer than 65.535 characters). |
| IOException | An I/O error occurred. |
| ZipException | Cannot perform the requested operation, or the operation was canceled (see ProblemType for detailed information). |
Move(String, String, String)
Moves (renames) an archive item (file or directory) within the specified ZIP archive.
Declaration
public static void Move(string zipFilePath, string fromPath, string toPath)
Parameters
| Type | Name | Description |
|---|---|---|
| String | zipFilePath | Path to a ZIP archive file. |
| String | fromPath | Original path to an archive item to move/rename. |
| String | toPath | New path to move (rename) the archive item to. |