Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Delete mentions of PathDiscovery permissions from File related except…
…ions

PathDiscovery is part of Code Access Security that has been deprecated for a long time. No need to complicate the docs by highlighting minor differences.
  • Loading branch information
jkotas committed Dec 8, 2021
commit 6e157433d6de442f4db809448e4158693bd4afd7
4 changes: 0 additions & 4 deletions xml/System.IO/DirectoryNotFoundException.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@
## Remarks
`DirectoryNotFoundException` uses the HRESULT COR_E_DIRECTORYNOTFOUND which has the value 0x80070003. Note that `DirectoryNotFoundException` is also thrown when COM interop programs see the HRESULT STG_E_PATHNOTFOUND, which has the value 0x80030003.

If your code does not have <xref:System.Security.Permissions.FileIOPermissionAttribute.PathDiscovery%2A> permission, the error message for this exception may only contain file or directory names instead of fully qualified paths.



## Examples
The following example shows how to force and recover from a <xref:System.IO.DirectoryNotFoundException>.

Expand Down
2 changes: 0 additions & 2 deletions xml/System.IO/FileLoadException.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@

`FileLoadException` has the default HRESULT of COR_E_FILELOAD, which has the value 0x80131621, but this is not the only possible HRESULT.

If your code does not have <xref:System.Security.Permissions.FileIOPermissionAttribute.PathDiscovery%2A> permission, the error message for this exception may only contain file or directory names instead of fully qualified paths.

> [!NOTE]
> This exception is not included in the [.NET for Windows Store apps](https://go.microsoft.com/fwlink/?LinkID=247912) or the [Portable Class Library](/dotnet/standard/cross-platform/cross-platform-development-with-the-portable-class-library), but it is thrown by some members that are. To catch the exception in that case, write a `catch` statement for <xref:System.IO.IOException> instead.

Expand Down
2 changes: 0 additions & 2 deletions xml/System.IO/FileNotFoundException.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@
## Remarks
`FileNotFoundException` uses the HRESULT COR_E_FILENOTFOUND which has the value 0x80070002.

If your code does not have <xref:System.Security.Permissions.FileIOPermissionAttribute.PathDiscovery%2A> permission, the error message for this exception may only contain file or directory names instead of fully qualified paths.

]]></format>
</remarks>
<altmember cref="T:System.Exception" />
Expand Down
2 changes: 0 additions & 2 deletions xml/System.IO/PathTooLongException.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
<format type="text/markdown"><![CDATA[

## Remarks
If your code does not have <xref:System.Security.Permissions.FileIOPermissionAttribute.PathDiscovery%2A?displayProperty=nameWithType> permission, the error message for this exception may contain only file or directory names instead of full paths.

In apps that run under versions of the .NET Framework prior to the .NET Framework 4.6.2, full paths must not exceed 260 characters to maintain compatibility with Windows operating systems. Any path in excess of 260 characters automatically throws a <xref:System.IO.PathTooLongException>. For more information about this restriction, see the entry [Long Paths in .NET](https://go.microsoft.com/fwlink/?LinkID=163666) in the BCL Team blog.

> [!NOTE]
Expand Down