ExtensionsFileInfoRename Method |
Namespace: Cauldron
Exception | Condition |
---|---|
FileNotFoundException | fileInfo does not exist. |
ArgumentNullException | newName is null. |
ArgumentException | newName is empty, contains only white spaces, or contains invalid characters. |
IOException | An I/O error occurs, such as the destination file already exists or the destination device is not ready. |
SecurityException | The caller does not have the required permission. |
UnauthorizedAccessException | newName is read-only or is a directory. |
DirectoryNotFoundException | The specified path is invalid, such as being on an unmapped drive. |
NotSupportedException | newName contains a colon (:) in the middle of the string. |
PathTooLongException | The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. |