diff --git a/xml/System.IO.Compression/BrotliStream.xml b/xml/System.IO.Compression/BrotliStream.xml index d32037447da..c1fa7cbd920 100644 --- a/xml/System.IO.Compression/BrotliStream.xml +++ b/xml/System.IO.Compression/BrotliStream.xml @@ -564,7 +564,7 @@ Asynchronously releases the unmanaged resources used by the . A task that represents the asynchronous dispose operation. - The `DisposeAsync` method lets you perform a resource-intensive dispose operation without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the and keywords in Visual Basic and C#. + The `DisposeAsync` method lets you perform a resource-intensive dispose operation without blocking the main thread. This performance consideration is particularly important in a desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the and keywords in Visual Basic and C#. This method disposes the Brotli stream by writing any changes to the backing store and closing the stream to release resources. Calling `DisposeAsync` allows the resources used by the to be reallocated for other purposes. For more information, see Cleaning Up Unmanaged Resources. @@ -916,7 +916,7 @@ Asynchronously reads a sequence of bytes from the current Brotli stream, writes them to a byte memory range, advances the position within the Brotli stream by the number of bytes read, and monitors cancellation requests. A task that represents the asynchronous read operation, which wraps the total number of bytes read into the buffer. The result value can be less than the number of bytes allocated in the buffer if that many bytes are not currently available, or it can be 0 (zero) if the end of the Brotli stream has been reached. - The `ReadAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the and keywords in Visual Basic and C#. + The `ReadAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the and keywords in Visual Basic and C#. Use the property to determine whether the current instance supports reading. If the operation is canceled before it completes, the returned task contains the value for the property. @@ -964,7 +964,7 @@ Asynchronously reads a sequence of bytes from the current Brotli stream, writes them to a byte array starting at a specified index, advances the position within the Brotli stream by the number of bytes read, and monitors cancellation requests. A task that represents the asynchronous read operation, which wraps the total number of bytes read into the . The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the Brotli stream has been reached. - The `ReadAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the and keywords in Visual Basic and C#. + The `ReadAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the and keywords in Visual Basic and C#. Use the property to determine whether the current instance supports reading. If the operation is canceled before it completes, the returned task contains the value for the property. This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . @@ -1198,7 +1198,7 @@ Asynchronously writes compressed bytes to the underlying Brotli stream from the specified byte memory range. A task that represents the asynchronous write operation. - The `WriteAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the and keywords in Visual Basic and C#. + The `WriteAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the and keywords in Visual Basic and C#. Use the property to determine whether the current instance supports writing. If the operation is canceled before it completes, the returned task contains the value for the property. @@ -1246,7 +1246,7 @@ Asynchronously writes compressed bytes to the underlying Brotli stream from the specified byte array. A task that represents the asynchronous write operation. - The `WriteAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the and keywords in Visual Basic and C#. + The `WriteAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the and keywords in Visual Basic and C#. Use the property to determine whether the current instance supports writing. If the operation is canceled before it completes, the returned task contains the value for the property. This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . diff --git a/xml/System.IO.Compression/DeflateStream.xml b/xml/System.IO.Compression/DeflateStream.xml index b8ba5c5232a..e26170a4b7e 100644 --- a/xml/System.IO.Compression/DeflateStream.xml +++ b/xml/System.IO.Compression/DeflateStream.xml @@ -55,7 +55,7 @@ class uses the zlib library. As a result, it provides a better compression algorithm and, in most cases, a smaller compressed file than it provides in earlier versions of .NET Framework. +This class represents the Deflate algorithm, which is an industry-standard algorithm for lossless file compression and decompression. This class uses the zlib library for compression. This class does not inherently provide functionality for adding files to or extracting files from zip archives. To work with zip archives, use the and the classes. @@ -480,9 +480,9 @@ You use this constructor when you want to specify whether compression efficiency [!IMPORTANT] -> Starting in .NET 6, this method might not read as many bytes as were requested. For more information, see [Partial and zero-byte reads in DeflateStream, GZipStream, and CryptoStream](/dotnet/core/compatibility/core-libraries/6.0/partial-byte-reads-in-streams). +> This method might not read as many bytes as were requested. For more information, see [Partial and zero-byte reads in DeflateStream, GZipStream, and CryptoStream](/dotnet/core/compatibility/core-libraries/6.0/partial-byte-reads-in-streams). -Starting with .NET Framework 4.5, you can perform asynchronous read operations by using the method. The method is still available in current versions to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). +This method is available to support legacy code; however, you can implement asynchronous I/O operations more easily by using the newer async methods such as . For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). Pass the return value to the method of the stream to determine how many bytes were read and to release operating system resources used for reading. You can do this either by using the same code that called or in a callback passed to . @@ -578,7 +578,7 @@ If a stream is closed or you pass an invalid argument, exceptions are thrown imm method. The method is still available in current versions to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). +This method is available to support legacy code; however, you can implement asynchronous I/O operations more easily by using the newer async methods such as . For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). Pass the object returned by the current method to to ensure that the write completes and frees resources appropriately. You can do this either by using the same code that called or in a callback passed to . If an error occurs during an asynchronous write operation, an exception will not be thrown until is called with the returned by this method. @@ -985,7 +985,7 @@ Calling `DisposeAsync` allows the resources used by the method. The method is still available in current versions to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). +This method is available to support legacy code; however, you can implement asynchronous I/O operations more easily by using the newer async methods such as . For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). Call this method to determine how many bytes were read from the stream. This method can be called once to return the amount of bytes read between calls to and . @@ -1051,7 +1051,7 @@ The stream is . ## Remarks -Starting with .NET Framework 4.5, you can perform asynchronous write operations by using the method. The method is still available in current versions to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). +This method is available to support legacy code; however, you can implement asynchronous I/O operations more easily by using the newer async methods such as . For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). must be called only once for every call to the method. diff --git a/xml/System.IO.Compression/GZipStream.xml b/xml/System.IO.Compression/GZipStream.xml index 3a80e1bf96f..843b84014bc 100644 --- a/xml/System.IO.Compression/GZipStream.xml +++ b/xml/System.IO.Compression/GZipStream.xml @@ -57,7 +57,7 @@ This class represents the gzip data format, which uses an industry-standard algorithm for lossless file compression and decompression. The format includes a cyclic redundancy check value for detecting data corruption. The gzip data format uses the same algorithm as the class, but can be extended to use other compression formats. The format can be readily implemented in a manner not covered by patents. -Starting with .NET Framework 4.5, the class uses the zlib library for compression. As a result, it provides a better compression algorithm and, in most cases, a smaller compressed file than it provides in earlier versions of .NET Framework. +This class uses the zlib library for compression. Compressed objects written to a file with an extension of .gz can be decompressed using many common compression tools; however, this class does not inherently provide functionality for adding files to or extracting files from zip archives. @@ -512,7 +512,7 @@ By default, the compression level is set to [!IMPORTANT] > Starting in .NET 6, this method might not read as many bytes as were requested. For more information, see [Partial and zero-byte reads in DeflateStream, GZipStream, and CryptoStream](/dotnet/core/compatibility/core-libraries/6.0/partial-byte-reads-in-streams). -Starting with .NET Framework 4.5, you can perform asynchronous read operations by using the method. The method is still available in current versions to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see [Asynchronous file I/O](/dotnet/standard/io/asynchronous-file-i-o). +This method is available to support legacy code; however, you can implement asynchronous I/O operations more easily by using the newer async methods such as . For more information, see [Asynchronous file I/O](/dotnet/standard/io/asynchronous-file-i-o). Pass the return value to the method of the stream to determine how many bytes were read and to release operating system resources used for reading. You can do this either by using the same code that called or in a callback passed to . @@ -609,7 +609,7 @@ If a stream is closed or you pass an invalid argument, exceptions are thrown imm ## Remarks -Starting with .NET Framework 4.5, you can perform asynchronous write operations by using the method. The method is still available in current versions to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). +This method is available to support legacy code; however, you can implement asynchronous I/O operations more easily by using the newer async methods such as . For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). The method starts an asynchronous write operation to a stream object. @@ -1019,7 +1019,7 @@ Calling `DisposeAsync` allows the resources used by the method. The method is still available in current versions to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). +This method is available to support legacy code; however, you can implement asynchronous I/O operations more easily by using the newer async methods such as . For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). Call this method to determine how many bytes were read from the stream. This method can be called once to return the amount of bytes read between calls to and . @@ -1080,7 +1080,7 @@ This method blocks until the I/O operation has completed. ## Remarks -Starting with .NET Framework 4.5, you can perform asynchronous write operations by using the method. The method is still available in current versions to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). +This method is available to support legacy code; however, you can implement asynchronous I/O operations more easily by using the newer async methods such as . For more information, see [Asynchronous File I/O](/dotnet/standard/io/asynchronous-file-i-o). The method completes the asynchronous write operation started in the method. diff --git a/xml/System.IO.IsolatedStorage/IsolatedStorageFile.xml b/xml/System.IO.IsolatedStorage/IsolatedStorageFile.xml index 6ecd2aa616d..8c7ec32a848 100644 --- a/xml/System.IO.IsolatedStorage/IsolatedStorageFile.xml +++ b/xml/System.IO.IsolatedStorage/IsolatedStorageFile.xml @@ -2275,7 +2275,7 @@ If there is no custom object, the quota increase request is denied, because the default implementation for returns `false`. - Currently, none of the hosts in the .NET Framework provide this customization, so always returns `false`. + Currently, none of the hosts in .NET provide this customization, so always returns `false`. ]]> @@ -2332,14 +2332,7 @@ Gets a value that indicates whether isolated storage is enabled. in all cases. - - - + To be added. Isolated Storage diff --git a/xml/System.IO.MemoryMappedFiles/MemoryMappedFile.xml b/xml/System.IO.MemoryMappedFiles/MemoryMappedFile.xml index 834771646cc..cb25365f9ad 100644 --- a/xml/System.IO.MemoryMappedFiles/MemoryMappedFile.xml +++ b/xml/System.IO.MemoryMappedFiles/MemoryMappedFile.xml @@ -843,7 +843,7 @@ Process C says: True is an empty string. is less than or equal to zero. - .NET Core and .NET 5+ only: Calls to the CreateNew method with a named memory mapped file (that is, a non-null ) are supported on Windows operating systems only. + Calls to the CreateNew method with a named memory mapped file (that is, a non-null ) are supported on Windows operating systems only. Memory-Mapped Files @@ -921,7 +921,7 @@ Process C says: True -or- is not a valid enumeration value. - .NET Core and .NET 5+ only: Calls to the CreateNew method with a named memory mapped file (that is, a non-null ) are supported on Windows operating systems only. + Calls to the CreateNew method with a named memory mapped file (that is, a non-null ) are supported on Windows operating systems only. Memory-Mapped Files @@ -1000,7 +1000,7 @@ Process C says: True -or- is not a valid value. - .NET Core and .NET 5+ only: Calls to the CreateNew method with a named memory mapped file (that is, a non-null ) are supported on Windows operating systems only. + Calls to the CreateNew method with a named memory mapped file (that is, a non-null ) are supported on Windows operating systems only. diff --git a/xml/System.IO.Packaging/Package.xml b/xml/System.IO.Packaging/Package.xml index 95a1f404a0f..ad4a2a709d0 100644 --- a/xml/System.IO.Packaging/Package.xml +++ b/xml/System.IO.Packaging/Package.xml @@ -86,7 +86,7 @@ Based on the architecture, an is a package type designed for storing documents based on the open [XML Paper Specification (XPS)](https://www.ecma-international.org/publications-and-standards/standards/ecma-388/). - .NET Framework uses packages to store content, resources, and relationships for pages and documents using a standard ZIP file by default. As with any ZIP file, your application can use the classes to store and optionally protect any type or number of data files in a single efficient-to-access container. + .NET uses packages to store content, resources, and relationships for pages and documents using a standard ZIP file by default. As with any ZIP file, your application can use the classes to store and optionally protect any type or number of data files in a single efficient-to-access container. For more information, see the Open Packaging Conventions (OPC) specification available for download at . diff --git a/xml/System.IO.Packaging/PackageDigitalSignatureManager.xml b/xml/System.IO.Packaging/PackageDigitalSignatureManager.xml index 6c23b9d3388..cd620013b34 100644 --- a/xml/System.IO.Packaging/PackageDigitalSignatureManager.xml +++ b/xml/System.IO.Packaging/PackageDigitalSignatureManager.xml @@ -28,7 +28,7 @@ ## Remarks - builds on the architecture of .NET Framework digital signature classes and provides a utility class for performing common tasks in using digital signatures with elements. + builds on the architecture of .NET digital signature classes and provides a utility class for performing common tasks in using digital signatures with elements. ## Examples diff --git a/xml/System.IO.Pipes/PipeStream.xml b/xml/System.IO.Pipes/PipeStream.xml index 6b27f3c1869..0c82fcfd97d 100644 --- a/xml/System.IO.Pipes/PipeStream.xml +++ b/xml/System.IO.Pipes/PipeStream.xml @@ -55,7 +55,7 @@ class provides the base class for named and anonymous pipes operations in the .NET Framework. Use the and classes for named pipe operations. Use the and classes for anonymous pipe operations. + The class provides the base class for named and anonymous pipes operations in .NET. Use the and classes for named pipe operations. Use the and classes for anonymous pipe operations. For more information about pipes, see [Pipes](/dotnet/standard/io/pipe-operations). For an example of anonymous pipes, see [How to: Use Anonymous Pipes for Local Interprocess Communication](/dotnet/standard/io/how-to-use-anonymous-pipes-for-local-interprocess-communication). For an example of named pipes, see [How to: Use Named Pipes for Network Interprocess Communication](/dotnet/standard/io/how-to-use-named-pipes-for-network-interprocess-communication). diff --git a/xml/System.IO/BufferedStream.xml b/xml/System.IO/BufferedStream.xml index 99ab5f14a05..dee7e516824 100644 --- a/xml/System.IO/BufferedStream.xml +++ b/xml/System.IO/BufferedStream.xml @@ -334,12 +334,13 @@ and to implement asynchronous file operations. These methods are still available in the .NET Framework 4.5 to support legacy code; however, the new async methods, such as , , and , help you implement asynchronous file operations more easily. - must be called exactly once for every call to . Failing to end a read process before beginning another read can cause undesirable behavior such as deadlock. +This method is available to support legacy code; however, the newer async methods, such as , , and , help you implement asynchronous file operations more easily. + + must be called exactly once for every call to . Failing to end a read process before beginning another read can cause undesirable behavior such as deadlock. > [!NOTE] -> Use the property to determine whether the current instance supports reading. +> Use the property to determine whether the current instance supports reading. must be called with this to find out how many bytes were read. @@ -429,9 +430,10 @@ and to implement asynchronous file operations. These methods are still available in the .NET Framework 4.5 to support legacy code; however, the new async methods, such as , , and , help you implement asynchronous file operations more easily. - must be called exactly once on every from . will block until the I/O operation has completed. +This method is available to support legacy code; however, the newer async methods, such as , , and , help you implement asynchronous file operations more easily. + + must be called exactly once on every from . blocks until the I/O operation has completed. ]]> @@ -539,8 +541,6 @@ If the stream is closed, this property returns `false`. - - ## Examples This code example is part of a larger example provided for the class. @@ -611,8 +611,6 @@ If the stream is closed, this property returns `false`. - - ## Examples This code example is part of a larger example provided for the class. @@ -684,8 +682,6 @@ If the stream is closed, this property returns `false`. - - ## Examples This code example is part of a larger example provided for the class. @@ -803,7 +799,7 @@ ## Remarks -The `CopyToAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. +The `CopyToAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. If the operation is canceled before it completes, the returned task contains the value for the property. @@ -922,7 +918,7 @@ This method is called by the public and to implement asynchronous file operations. These methods are still available in the .NET Framework 4.5 to support legacy code; however, the new async methods, such as , , and , help you implement asynchronous file operations more easily. + +This method is available to support legacy code; however, the newer async methods, such as , , and , help you implement asynchronous file operations more easily. must be called with this to find out how many bytes were read. @@ -1044,9 +1041,10 @@ Calling `DisposeAsync` allows the resources used by the and to implement asynchronous file operations. These methods are still available in the .NET Framework 4.5 to support legacy code; however, the new async methods, such as , , and , help you implement asynchronous file operations more easily. - must be called exactly once for every call to . Failing to end a read process before beginning another read operation can cause deadlock or other undesirable behavior. +This method is available to support legacy code; however, the newer async methods, such as , , and , help you implement asynchronous file operations more easily. + + must be called exactly once for every call to . Failing to end a read process before beginning another write operation can cause deadlock or other undesirable behavior. ]]> @@ -1502,7 +1500,7 @@ Use for reading primitive data types. ## Remarks -The `ReadAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. +The `ReadAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. Use the property to determine whether the current instance supports reading. @@ -2015,7 +2013,7 @@ If the write operation is successful, the position within the buffered stream ad ## Remarks -The `WriteAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. +The `WriteAsync` method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. Use the property to determine whether the current instance supports writing. diff --git a/xml/System.IO/Directory.xml b/xml/System.IO/Directory.xml index 3a2e05e14e6..c09915560e6 100644 --- a/xml/System.IO/Directory.xml +++ b/xml/System.IO/Directory.xml @@ -237,11 +237,8 @@ Directory.CreateDirectory("c:\\Users\\User1\\Public\\Html"); The network name is not known. The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. - - -or- - - is prefixed with, or contains, only a colon character (:). + + is prefixed with, or contains, only a colon character (:). is . The specified path, file name, or both exceed the system-defined maximum length. @@ -514,7 +511,6 @@ This method creates a new directory with a unique name under the path returned b The directory is being used by another process. The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -624,7 +620,6 @@ This method creates a new directory with a unique name under the path returned b The directory is being used by another process. The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -714,7 +709,6 @@ This method creates a new directory with a unique name under the path returned b ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. is . @@ -795,8 +789,6 @@ This method creates a new directory with a unique name under the path returned b The returned collection is not cached; each call to the on the collection will start a new enumeration. - - ## Examples The following example enumerates the top-level directories in a specified path that match a specified search pattern. @@ -806,17 +798,12 @@ This method creates a new directory with a unique name under the path returned b ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters with the method. - - -or- - - does not contain a valid pattern. + + does not contain a valid pattern. + - is . - - -or- - - is . + or is . + is invalid, such as referring to an unmapped drive. @@ -891,11 +878,9 @@ This method creates a new directory with a unique name under the path returned b ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. - - -or- - - does not contain a valid pattern. + + does not contain a valid pattern. + or is . @@ -987,17 +972,12 @@ This method creates a new directory with a unique name under the path returned b ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. - - -or- - - does not contain a valid pattern. + + does not contain a valid pattern. + - is . - - -or- - - is . + or is . + is not a valid value. @@ -1090,7 +1070,6 @@ This method creates a new directory with a unique name under the path returned b ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. is . @@ -1188,17 +1167,12 @@ The returned collection is not cached. Each call to the - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. - - -or- - - does not contain a valid pattern. + + does not contain a valid pattern. + - is . - - -or- - - is . + or is . + is invalid, such as referring to an unmapped drive. @@ -1287,17 +1261,10 @@ The following example recursively enumerates all files with the `.txt` extension ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. - - -or- - - does not contain a valid pattern. + + does not contain a valid pattern. - is . - - -or- - - is . + or is . is invalid, such as referring to an unmapped drive. @@ -1394,17 +1361,10 @@ The returned collection is not cached. Each call to the - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. - - -or- - - does not contain a valid pattern. + + does not contain a valid pattern. - is . - - -or- - - is . + or is . is not a valid value. @@ -1484,7 +1444,6 @@ The returned collection is not cached. Each call to the - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. is . @@ -1575,17 +1534,10 @@ The returned collection is not cached. Each call to the - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. - - -or- - - does not contain a valid pattern. + + does not contain a valid pattern. - is . - - -or- - - is . + or is . is invalid, such as referring to an unmapped drive. @@ -1668,17 +1620,9 @@ The returned collection is not cached. Each call to the - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. - - -or- - - does not contain a valid pattern. + does not contain a valid pattern. - is . - - -or- - - is . + or is . is invalid, such as referring to an unmapped drive. @@ -1769,17 +1713,9 @@ The returned collection is not cached. Each call to the - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. - - -or- - - does not contain a valid pattern. + does not contain a valid pattern. - is . - - -or- - - is . + or is . is not a valid value. @@ -1967,7 +1903,6 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -2049,7 +1984,6 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -2218,7 +2152,6 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -2320,11 +2253,7 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using . - - -or- - - doesn't contain a valid pattern. + doesn't contain a valid pattern. or is . The specified path, file name, or both exceed the system-defined maximum length. @@ -2408,11 +2337,7 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using . - - -or- - - doesn't contain a valid pattern. + doesn't contain a valid pattern. or is . The specified path, file name, or both exceed the system-defined maximum length. @@ -2508,11 +2433,7 @@ The returned collection is not cached. Each call to the - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. - - -or- - - does not contain a valid pattern. + does not contain a valid pattern. or is . @@ -2604,7 +2525,6 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with . is . The specified path, file name, or both exceed the system-defined maximum length. @@ -2705,7 +2625,6 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -2811,11 +2730,7 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using . - - -or- - - doesn't contain a valid pattern. + doesn't contain a valid pattern. or is . The specified path, file name, or both exceed the system-defined maximum length. @@ -2905,11 +2820,7 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using . - - -or- - - doesn't contain a valid pattern. + doesn't contain a valid pattern. or is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3001,11 +2912,7 @@ The returned collection is not cached. Each call to the - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. - - -or- - - does not contain a valid pattern. + does not contain a valid pattern. or is . @@ -3110,7 +3017,6 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with . is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3217,11 +3123,7 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. - - -or- - - does not contain a valid pattern. + does not contain a valid pattern. or is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3310,11 +3212,7 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. - --or- - - does not contain a valid pattern. + does not contain a valid pattern. or is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3404,17 +3302,9 @@ The returned collection is not cached. Each call to the - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. - - -or- - - does not contain a valid pattern. + does not contain a valid pattern. - is . - - -or- - - is . + or is . is not a valid value. @@ -3505,7 +3395,6 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3588,7 +3477,6 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3675,7 +3563,6 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3757,7 +3644,6 @@ The returned collection is not cached. Each call to the The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3918,14 +3804,12 @@ The returned collection is not cached. Each call to the The directory specified by is read-only. The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. is . The specified path, file name, or both exceed the system-defined maximum length. For more information, see the topic. The specified path was not found. is in an invalid format. - .NET Framework only: The caller does not have the required permissions. File and Stream I/O How to: Read Text from a File @@ -3997,7 +3881,7 @@ Trailing spaces are removed from the end of the path parameters before moving th For a list of common I/O tasks, see [Common I/O Tasks](/dotnet/standard/io/common-i-o-tasks). > [!NOTE] -> Starting with .NET Core 3.0, the `Move` method throws an in all platforms when the `destDirName` already exists. See [C++ rename](https://linux.die.net/man/2/rename). +> The `Move` method throws an in all platforms when the `destDirName` already exists. See [C++ rename](https://linux.die.net/man/2/rename). ## Examples @@ -4023,7 +3907,6 @@ The following example demonstrates how to move a directory and all its files to The directory or a file within it is being used by another process. The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: or is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. or is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4164,7 +4047,6 @@ There are too many levels of symbolic links. ]]> The specified path was not found. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4240,7 +4122,6 @@ There are too many levels of symbolic links. ]]> The specified path was not found. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4327,7 +4208,6 @@ There are too many levels of symbolic links. ]]> An I/O error occurred. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4411,7 +4291,6 @@ There are too many levels of symbolic links. ]]> The specified path was not found. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4496,7 +4375,6 @@ There are too many levels of symbolic links. ]]> The specified path was not found. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4584,7 +4462,6 @@ There are too many levels of symbolic links. was not found (for example, the directory doesn't exist or it is on an unmapped drive). was not found (for example, the directory doesn't exist or it is on an unmapped drive). - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4672,7 +4549,6 @@ There are too many levels of symbolic links. was not found (for example, the directory doesn't exist or it is on an unmapped drive). was not found (for example, the directory doesn't exist or it is on an unmapped drive). - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters with the method. is . The specified path, file name, or both exceed the system-defined maximum length. diff --git a/xml/System.IO/DirectoryInfo.xml b/xml/System.IO/DirectoryInfo.xml index 1776706b108..2578154ca71 100644 --- a/xml/System.IO/DirectoryInfo.xml +++ b/xml/System.IO/DirectoryInfo.xml @@ -185,7 +185,6 @@ is . The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: contains invalid characters such as ", <, >, or |. The specified path, file name, or both exceed the system-defined maximum length. File and Stream I/O @@ -1975,7 +1974,6 @@ ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more invalid characters defined by the method. is . The path encapsulated in the object is invalid (for example, it is on an unmapped drive). @@ -2055,7 +2053,6 @@ ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more invalid characters defined by the method. is . The path encapsulated in the object is invalid (for example, it is on an unmapped drive). @@ -2153,7 +2150,6 @@ ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more invalid characters defined by the method. is . @@ -2388,7 +2384,6 @@ ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more invalid characters defined by the method. is . The path is invalid (for example, it is on an unmapped drive). @@ -2497,7 +2492,6 @@ ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more invalid characters defined by the method. is . The path is invalid (for example, it is on an unmapped drive). @@ -2623,7 +2617,6 @@ ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more invalid characters defined by the method. is . @@ -2829,7 +2822,6 @@ ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more invalid characters defined by the method. is . The specified path is invalid (for example, it is on an unmapped drive). @@ -2919,7 +2911,6 @@ ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more invalid characters defined by the method. is . The specified path is invalid (for example, it is on an unmapped drive). @@ -3007,7 +2998,6 @@ ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more invalid characters defined by the method. is . @@ -3236,18 +3226,15 @@ ## Remarks -> [!IMPORTANT] -> In .NET Framework, `Parent` returns a relative path. -> In .NET Core, `Parent` returns a fully qualified path. +This property returns a fully qualified path. + +To ensure consistent behavior across versions and to make your intent explicit, retrieve the value of one of the following properties on the instance returned by `Parent`: -To ensure consistent behavior across versions and to make your intent explicit, retrieve the value of one of the following properties on the instance returned by `Parent`. - , which returns the simple name of the directory (such as `bin`). - , which returns the absolute path of the directory. - For a list of common I/O tasks, see [Common I/O Tasks](/dotnet/standard/io/common-i-o-tasks). - ## Examples The following example refers to the parent directory of a specified directory. diff --git a/xml/System.IO/File.xml b/xml/System.IO/File.xml index 04860974ba1..563c4e7c5ef 100644 --- a/xml/System.IO/File.xml +++ b/xml/System.IO/File.xml @@ -780,7 +780,6 @@ ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -956,7 +955,6 @@ ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -1251,7 +1249,6 @@ ]]> The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -1586,7 +1583,6 @@ -or- specified a file that is hidden. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -1684,7 +1680,6 @@ -or- specified a file that is hidden. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -1772,7 +1767,6 @@ -or- specified a file that is hidden. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -1946,7 +1940,6 @@ An I/O error occurred. -or- specified a file that is hidden. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -2018,7 +2011,7 @@ An I/O error occurred. > [!IMPORTANT] > This API is only supported on Windows platforms that are able to use the NTFS Encrypting File System (EFS). Any attempt to use this on non-Windows systems, Windows Home Edition systems, or non-NTFS drives results in a or , depending on the situation. > - > Use of this API in .NET Core is not recommended; it is included to enable portability for applications that move to .NET Core but still explicitly target Windows. + > Use of this API is not recommended; it is included to enable portability for applications that migrate from .NET Framework but still explicitly target Windows. The method requires exclusive access to the file being decrypted, and will raise an exception if another process is using the file. @@ -2026,16 +2019,8 @@ An I/O error occurred. The current file system must be formatted as NTFS and the current operating system must be Windows NT or later. -## Examples - The following code example uses the method and the method to encrypt and then decrypt a file. The file must exist for the example to work. - - :::code language="csharp" source="~/snippets/csharp/System.IO/File/Decrypt/sample.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System.IO/File/Decrypt/sample.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.IO/File/Decrypt/sample.vb" id="Snippet1"::: - ]]> - .NET Framework and .NET Core versions older than 2.1: The parameter is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. The parameter is . An invalid drive was specified. The file described by the parameter could not be found. @@ -2130,7 +2115,6 @@ An I/O error occurred. ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path is invalid (for example, it is on an unmapped drive). @@ -2218,7 +2202,7 @@ An I/O error occurred. > [!IMPORTANT] > This API is only supported on Windows platforms that are able to use the NTFS Encrypting File System (EFS). Any attempt to use this on non-Windows systems, Windows Home Edition systems, or non-NTFS drives results in a or , depending on the situation. > - > Use of this API in .NET Core is not recommended; it is included to enable portability for applications that move to .NET Core but still explicitly target Windows. + > Use of this API in is not recommended; it is included to enable portability for applications that move from .NET Framework but still explicitly target Windows. The method requires exclusive access to the file being encrypted, and will fail if another process is using the file. @@ -2228,16 +2212,8 @@ An I/O error occurred. The current file system must be formatted as NTFS. -## Examples - The following code example uses the method and the method to encrypt and then decrypt a file. The file must exist for the example to work. - - :::code language="csharp" source="~/snippets/csharp/System.IO/File/Decrypt/sample.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System.IO/File/Decrypt/sample.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.IO/File/Decrypt/sample.vb" id="Snippet1"::: - ]]> - .NET Framework and .NET Core versions older than 2.1: The parameter is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. The parameter is . An invalid drive was specified. The file described by the parameter could not be found. @@ -2469,7 +2445,6 @@ Don't use the method for path validation; this met ]]> - .NET Framework and .NET Core versions older than 2.1: is empty, contains only white spaces, or contains invalid characters. The specified path, file name, or both exceed the system-defined maximum length. is in an invalid format. @@ -2596,7 +2571,6 @@ Don't use the method for path validation; this met ]]> The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -2718,7 +2692,6 @@ Don't use the method for path validation; this met ]]> The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -2842,7 +2815,6 @@ Don't use the method for path validation; this met ]]> The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -2957,7 +2929,6 @@ Don't use the method for path validation; this met ]]> The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3081,7 +3052,6 @@ Don't use the method for path validation; this met ]]> The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3196,7 +3166,6 @@ Don't use the method for path validation; this met ]]> The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3357,7 +3326,7 @@ This method works across disk volumes, and it does not throw an exception if the Note that if you attempt to replace a file by moving a file of the same name into that directory, an is thrown. To avoid this problem: -- In .NET Core 3.0 and later versions, you can call setting the parameter `overwrite` to `true`, which replaces the file if it exists. +- You can call and set the `overwrite` parameter to `true`, which replaces the file if it exists. - In all .NET versions, you can call to copy with overwrite, then call `Delete` to remove the excess source file. This strategy isn't atomic, because a system or program crash during the `Copy` may leave a partially-written destination file, but it will ensure a (possibly incomplete) file always exists at the destination. @@ -3393,7 +3362,6 @@ The following example moves a file. or is . - .NET Framework and .NET Core versions older than 2.1: or is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. The caller does not have the required permission. The specified path, file name, or both exceed the system-defined maximum length. The path specified in or is invalid, (for example, it is on an unmapped drive). @@ -3480,7 +3448,6 @@ The following example moves a file. was not found. or is . - .NET Framework and .NET Core versions older than 2.1: or is a zero-length string, contains only white space, or contains invalid characters. You can query for invalid characters by using the method. The caller does not have the required permission. -or- @@ -3574,7 +3541,6 @@ The following example moves a file. ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3723,11 +3689,7 @@ The following example moves a file. ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. - - -or- - - specified and specified , , , or . + specified and specified , , , or . is . The specified path, file name, or both exceed the system-defined maximum length. @@ -3830,11 +3792,7 @@ The following example moves a file. ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. - - -or- - - specified and specified , , , or . + specified and specified , , , or . is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4026,7 +3984,6 @@ The following example moves a file. ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4117,7 +4074,6 @@ The following example moves a file. ]]> The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4209,7 +4165,6 @@ The following example moves a file. -or- specified a read-only file or directory. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4277,7 +4232,6 @@ The following example moves a file. ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4423,7 +4377,6 @@ The following example moves a file. ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4518,7 +4471,6 @@ The following example moves a file. ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4711,7 +4663,6 @@ The following example moves a file. ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -4808,7 +4759,6 @@ The following example moves a file. ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -5008,7 +4958,6 @@ The following example reads the lines of a file to find lines that contain speci ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters defined by the method. is . @@ -5099,7 +5048,6 @@ A line is defined as a sequence of characters terminated by a carriage return (' ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters as defined by the method. is . @@ -5616,7 +5564,6 @@ It is not possible to change the compression status of a o ]]> - .NET Framework and .NET Core versions older than 2.1: is empty, contains only white spaces, contains invalid characters, or the file attribute is invalid. The specified path, file name, or both exceed the system-defined maximum length. is in an invalid format. @@ -5747,7 +5694,6 @@ It is not possible to change the compression status of a o ]]> The specified path was not found. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -5867,7 +5813,6 @@ It is not possible to change the compression status of a o ]]> The specified path was not found. - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -5994,7 +5939,6 @@ It is not possible to change the compression status of a o ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -6112,7 +6056,6 @@ It is not possible to change the compression status of a o ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -6239,7 +6182,6 @@ It is not possible to change the compression status of a o ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -6357,7 +6299,6 @@ It is not possible to change the compression status of a o ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -6525,7 +6466,6 @@ It is not possible to change the compression status of a o ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is or the byte array is empty. The specified path, file name, or both exceed the system-defined maximum length. @@ -6789,7 +6729,6 @@ You can use this method to create the contents for a collection class that takes ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters defined by the method. Either or is . is invalid (for example, it is on an unmapped drive). @@ -6883,7 +6822,6 @@ Given a string array and a file path, this method opens the specified file, writ ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. Either or is . The specified path, file name, or both exceed the system-defined maximum length. The specified path is invalid (for example, it is on an unmapped drive). @@ -6974,7 +6912,6 @@ Given a string array and a file path, this method opens the specified file, writ ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters defined by the method. Either , , or is . is invalid (for example, it is on an unmapped drive). @@ -7071,7 +7008,6 @@ Given a string array and a file path, this method opens the specified file, writ ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. Either or is . The specified path, file name, or both exceed the system-defined maximum length. The specified path is invalid (for example, it is on an unmapped drive). @@ -7345,7 +7281,6 @@ Given a string array and a file path, this method opens the specified file, writ ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. @@ -7522,7 +7457,6 @@ Given a string array and a file path, this method opens the specified file, writ ]]> - .NET Framework and .NET Core versions older than 2.1: is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the method. is . The specified path, file name, or both exceed the system-defined maximum length. diff --git a/xml/System.IO/FileAttributes.xml b/xml/System.IO/FileAttributes.xml index 00399c17b59..3151f412fe9 100644 --- a/xml/System.IO/FileAttributes.xml +++ b/xml/System.IO/FileAttributes.xml @@ -73,7 +73,7 @@ It is not possible to change the compression status of a object by using the method. Instead, you must actually compress the file using either a compression tool or one of the classes in the namespace. -The following attributes are not supported by .NET Core on Linux and macOS: +The following attributes are not supported on Linux and macOS: - - diff --git a/xml/System.IO/FileInfo.xml b/xml/System.IO/FileInfo.xml index c3813f0595d..ffd5ded1ae0 100644 --- a/xml/System.IO/FileInfo.xml +++ b/xml/System.IO/FileInfo.xml @@ -206,7 +206,6 @@ C:\Users\userName\AppData\Local\Temp\tmp70CB.tmp was successfully deleted. is . The caller does not have the required permission. - .NET Framework and .NET Core versions older than 2.1: The file name is empty, contains only white spaces, or contains invalid characters. Access to is denied. The specified path, file name, or both exceed the system-defined maximum length. @@ -366,7 +365,6 @@ C:\Users\userName\AppData\Local\Temp\tmp70CB.tmp was successfully deleted. ]]> - .NET Framework and .NET Core versions older than 2.1: is empty, contains only white spaces, or contains invalid characters. An error occurs, or the destination file already exists. The caller does not have the required permission. @@ -457,7 +455,6 @@ C:\Users\userName\AppData\Local\Temp\tmp70CB.tmp was successfully deleted. ]]> - .NET Framework and .NET Core versions older than 2.1: is empty, contains only white spaces, or contains invalid characters. An error occurs, or the destination file already exists and is . The caller does not have the required permission. @@ -1347,7 +1344,6 @@ The following example demonstrates moving a file to a different location and ren An I/O error occurs, such as the destination file already exists or the destination device is not ready. is . - .NET Framework and .NET Core versions older than 2.1: is empty, contains only white spaces, or contains invalid characters. The caller does not have the required permission. is read-only or is a directory. @@ -1418,7 +1414,6 @@ The following example demonstrates moving a file to a different location and ren An I/O error occurred, such as the destination device is not ready. is . - .NET Framework and .NET Core versions older than 2.1: is empty, contains only white spaces, or contains invalid characters. The caller does not have the required permission. is read-only or is a directory. diff --git a/xml/System.IO/FileStream.xml b/xml/System.IO/FileStream.xml index 97c9d7c3087..9f5e16a5f8e 100644 --- a/xml/System.IO/FileStream.xml +++ b/xml/System.IO/FileStream.xml @@ -355,13 +355,9 @@ ]]> - .NET Framework and .NET Core versions older than 2.1: is an empty string (""), contains only white space, or contains one or more invalid characters. - - -or- - - refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in an NTFS environment. + refers to a non-file device, such as "con:", "com1:", or "lpt1:", in an NTFS environment. - refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in a non-NTFS environment. + refers to a non-file device, such as "con:", "com1:", or "lpt1:", in a non-NTFS environment. is . The caller does not have the required permission. @@ -708,13 +704,9 @@ The file was too large (when is . - .NET Framework and .NET Core versions older than 2.1: is an empty string (""), contains only white space, or contains one or more invalid characters. - - -or- - - refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in an NTFS environment. + refers to a non-file device, such as "con:", "com1:", or "lpt1:", in an NTFS environment. - refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in a non-NTFS environment. + refers to a non-file device, such as "con:", "com1:", or "lpt1:", in a non-NTFS environment. The file cannot be found, such as when is or , and the file specified by does not exist. The file must already exist in these modes. An I/O error, such as specifying when the file specified by already exists, occurred. @@ -997,13 +989,9 @@ The file was too large (when is . - .NET Framework and .NET Core versions older than 2.1: is an empty string (""), contains only white space, or contains one or more invalid characters. - - -or- - - refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in an NTFS environment. + refers to a non-file device, such as "con:", "com1:", or "lpt1:", in an NTFS environment. - refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in a non-NTFS environment. + refers to a non-file device, such as "con:", "com1:", or "lpt1:", in a non-NTFS environment. The file cannot be found, such as when is or , and the file specified by does not exist. The file must already exist in these modes. An I/O error, such as specifying when the file specified by already exists, occurred. @@ -1198,13 +1186,9 @@ The file was too large (when is . - .NET Framework and .NET Core versions older than 2.1: is an empty string (""), contains only white space, or contains one or more invalid characters. - - -or- - - refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in an NTFS environment. + refers to a non-file device, such as "con:", "com1:", or "lpt1:", in an NTFS environment. - refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in a non-NTFS environment. + refers to a non-file device, such as "con:", "com1:", or "lpt1:", in a non-NTFS environment. is negative or zero. @@ -1312,13 +1296,9 @@ The file was too large (when is . - .NET Framework and .NET Core versions older than 2.1: is an empty string (""), contains only white space, or contains one or more invalid characters. - - -or- - - refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in an NTFS environment. + refers to a non-file device, such as "con:", "com1:", or "lpt1:", in an NTFS environment. - refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in a non-NTFS environment. + refers to a non-file device, such as "con:", "com1:", or "lpt1:", in a non-NTFS environment. is negative or zero. @@ -1426,13 +1406,9 @@ The file was too large (when is . - .NET Framework and .NET Core versions older than 2.1: is an empty string (""), contains only white space, or contains one or more invalid characters. - - -or- - - refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in an NTFS environment. + refers to a non-file device, such as "con:", "com1:", or "lpt1:", in an NTFS environment. - refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in a non-NTFS environment. + refers to a non-file device, such as "con:", "com1:", or "lpt1:", in a non-NTFS environment. is negative or zero. @@ -1932,7 +1908,7 @@ The file was too large (when and to implement asynchronous file operations. These methods are still available in the .NET Framework 4.5 to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous file operations more easily. + +This method is available to support legacy code; however, the newer async methods, such as , , , and , help you implement asynchronous file operations more easily. must be called exactly for every call to . Failing to end a read process before beginning another read can cause undesirable behavior such as deadlock. @@ -2122,8 +2099,6 @@ Calling `DisposeAsync` allows the resources used by the can be called on every from . Calling tells you how many bytes were read from the stream. will block until the I/O operation has completed. - - ## Examples This code example is part of a larger example provided for the constructor. @@ -2194,14 +2169,13 @@ Calling `DisposeAsync` allows the resources used by the and to implement asynchronous file operations. These methods are still available in the .NET Framework 4.5 to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous file operations more easily. + +This method is available to support legacy code; however, the newer async methods, such as , , , and , help you implement asynchronous file operations more easily. This method overrides . must be called exactly once on every from . will block until the I/O operation has completed. - - ## Examples This code example is part of a larger example provided for the constructor. @@ -3134,7 +3108,7 @@ Use for reading primitive data types. ## Remarks -The `ReadAsync` method enables you to perform resource-intensive file operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. +The `ReadAsync` method enables you to perform resource-intensive file operations without blocking the main thread. This performance consideration is particularly important in a desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. Use the property to determine whether the current instance supports reading. @@ -3210,7 +3184,7 @@ The following example shows how to read from a file asynchronously. ## Remarks -The `ReadAsync` method enables you to perform resource-intensive file operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. +The `ReadAsync` method enables you to perform resource-intensive file operations without blocking the main thread. This performance consideration is particularly important in a desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. Use the property to determine whether the current instance supports reading. diff --git a/xml/System.IO/FileSystemAclExtensions.xml b/xml/System.IO/FileSystemAclExtensions.xml index ce039b9ce3e..ce78f114796 100644 --- a/xml/System.IO/FileSystemAclExtensions.xml +++ b/xml/System.IO/FileSystemAclExtensions.xml @@ -73,7 +73,7 @@ ## Remarks -This extension method was added to .NET Core to bring the functionality that was provided by the [DirectoryInfo.Create(DirectorySecurity)](/dotnet/api/system.io.directoryinfo.create?view=netframework-4.8#System_IO_DirectoryInfo_Create_System_Security_AccessControl_DirectorySecurity_) .NET Framework method. +This extension method was added to .NET to provide the functionality of the [DirectoryInfo.Create(DirectorySecurity)](/dotnet/api/system.io.directoryinfo.create?view=netframework-4.8#System_IO_DirectoryInfo_Create_System_Security_AccessControl_DirectorySecurity_) .NET Framework method. ## Examples @@ -143,10 +143,10 @@ The following code example creates a new directory inside the user's temporary f ## Remarks -This extension method was added to .NET Core to bring the functionality that was provided by: +This extension method was added to .NET to provide the functionality of the following .NET Framework members: -- The [FileStream(String, FileMode, FileSystemRights, FileShare, Int32, FileOptions, FileSecurity)](/dotnet/api/system.io.filestream.-ctor?view=netframework-4.8#System_IO_FileStream__ctor_System_String_System_IO_FileMode_System_Security_AccessControl_FileSystemRights_System_IO_FileShare_System_Int32_System_IO_FileOptions_System_Security_AccessControl_FileSecurity_) .NET Framework constructor. -- The [File.Create(String, Int32, FileOptions, FileSecurity](/dotnet/api/system.io.file.create?view=netframework-4.8#System_IO_File_Create_System_String_System_Int32_System_IO_FileOptions_System_Security_AccessControl_FileSecurity_) .NET Framework method. +- The [FileStream(String, FileMode, FileSystemRights, FileShare, Int32, FileOptions, FileSecurity)](/dotnet/api/system.io.filestream.-ctor?view=netframework-4.8#System_IO_FileStream__ctor_System_String_System_IO_FileMode_System_Security_AccessControl_FileSystemRights_System_IO_FileShare_System_Int32_System_IO_FileOptions_System_Security_AccessControl_FileSecurity_) constructor. +- The [File.Create(String, Int32, FileOptions, FileSecurity](/dotnet/api/system.io.file.create?view=netframework-4.8#System_IO_File_Create_System_String_System_Int32_System_IO_FileOptions_System_Security_AccessControl_FileSecurity_) method. ## Examples @@ -205,7 +205,7 @@ The following code example creates a new text file inside the user's temporary f ## Remarks -This extension method was added to .NET Core to bring the functionality that was provided by the `System.IO.Directory.CreateDirectory(System.String,System.Security.AccessControl.DirectorySecurity)` .NET Framework method. +This extension method was added to .NET provide the functionality of the `System.IO.Directory.CreateDirectory(System.String,System.Security.AccessControl.DirectorySecurity)` .NET Framework method. ]]> diff --git a/xml/System.IO/FileSystemInfo.xml b/xml/System.IO/FileSystemInfo.xml index 5d1b0283a21..f7af0e52734 100644 --- a/xml/System.IO/FileSystemInfo.xml +++ b/xml/System.IO/FileSystemInfo.xml @@ -330,13 +330,9 @@ The specified file doesn't exist. Only thrown when setting the property value. The specified path is invalid. For example, it's on an unmapped drive. Only thrown when setting the property value. The caller doesn't have the required permission. - .NET Core and .NET 5+ only: The user attempts to set an attribute value but doesn't have write permission. + The user attempts to set an attribute value but doesn't have write permission. The specified path, file name, or both exceed the system-defined maximum length. - The caller attempts to set an invalid file attribute. - - -or- - - .NET Framework only: The user attempts to set an attribute value but doesn't have write permission. + The caller attempts to set an invalid file attribute. cannot initialize the data. diff --git a/xml/System.IO/InternalBufferOverflowException.xml b/xml/System.IO/InternalBufferOverflowException.xml index 4ed9b02d5d7..957c911fa7f 100644 --- a/xml/System.IO/InternalBufferOverflowException.xml +++ b/xml/System.IO/InternalBufferOverflowException.xml @@ -129,7 +129,7 @@ and properties to filter out unwanted change notifications. You can also increase the size of the internal buffer through the property. However, increasing the size of the buffer is expensive, so keep the buffer as small as possible. + These constructors are used by the component to signify an error. Only use them if you're extending the class or .NET. This exception indicates an internal buffer has overflowed and users should take appropriate steps in their code to ensure it recovers properly. The cause of the overflow is often too many changes in a short period of time, causing the internal notification buffer to overflow. To resolve this, use the and properties to filter out unwanted change notifications. You can also increase the size of the internal buffer through the property. However, increasing the size of the buffer is expensive, so keep the buffer as small as possible. ]]> @@ -183,7 +183,7 @@ and properties to filter out unwanted change notifications. You can also increase the size of the internal buffer through the property. However, increasing the size of the buffer is expensive, so keep the buffer as small as possible. + These constructors are used by the component to signify an error. Only use them if you're extending the class or .NET. This exception indicates an internal buffer has overflowed and users should take appropriate steps in their code to ensure it recovers properly. The cause of the overflow is often too many changes in a short period of time, causing the internal notification buffer to overflow. To resolve this, use the and properties to filter out unwanted change notifications. You can also increase the size of the internal buffer through the property. However, increasing the size of the buffer is expensive, so keep the buffer as small as possible. ]]> @@ -291,7 +291,7 @@ and properties to filter out unwanted change notifications. You can also increase the size of the internal buffer through the property. However, increasing the size of the buffer is expensive, so keep the buffer as small as possible. + These constructors are used by the component to signify an error. Only use them if you're extending the class or .NET. This exception indicates an internal buffer has overflowed and users should take appropriate steps in their code to ensure it recovers properly. The cause of the overflow is often too many changes in a short period of time, causing the internal notification buffer to overflow. To resolve this, use the and properties to filter out unwanted change notifications. You can also increase the size of the internal buffer through the property. However, increasing the size of the buffer is expensive, so keep the buffer as small as possible. ]]> diff --git a/xml/System.IO/Path.xml b/xml/System.IO/Path.xml index 33c57c92f4a..8778435836b 100644 --- a/xml/System.IO/Path.xml +++ b/xml/System.IO/Path.xml @@ -73,17 +73,13 @@ A path can contain absolute or relative location information. Absolute paths fully specify a location: the file or directory can be uniquely identified regardless of the current location. Relative paths specify a partial location: the current location is used as the starting point when locating a file specified with a relative path. To determine the current directory, call . -This type also supports access to file system objects that are device names, such as "\\\\?\\C:\\". Device name support was added in .NET Framework 4.6.2. +This type also supports access to file system objects that are device names, such as "\\\\?\\C:\\". For more information on file path formats on Windows, see [File path formats on Windows systems](/dotnet/standard/io/file-path-formats). Most members of the `Path` class do not interact with the file system and do not verify the existence of the file specified by a path string. `Path` class members that modify a path string, such as , have no effect on names of files in the file system. - Some `Path` members do validate the contents of a specified path string, and throw an if the string contains characters that are not valid in path strings, as defined in the characters returned from the method. For example, on Windows-based desktop platforms, invalid path characters might include quote ("), less than (\<), greater than (>), pipe (|), backspace (\\b), null (\\0), and Unicode characters 16 through 18 and 20 through 25. This validation behavior varies between .NET versions: - - - On .NET Framework: All `Path` members that take a path as an argument throw an if they detect invalid path characters. - - - On .NET: is the only member that throws an if the string contains invalid path characters. + validates the contents of a specified path string, and throw an if the string contains characters that are not valid in path strings, as defined in the characters returned from the method. For example, on Windows-based desktop platforms, invalid path characters might include quote ("), less than (\<), greater than (>), pipe (|), backspace (\\b), null (\\0), and Unicode characters 16 through 18 and 20 through 25. The members of the `Path` class enable you to quickly and easily perform common operations such as determining whether a file name extension is part of a path, and combining two strings into one path name. @@ -94,13 +90,10 @@ For more information on file path formats on Windows, see [File path formats on In members that accept a path, the path can refer to a file or just a directory. The specified path can also refer to a relative path or a Universal Naming Convention (UNC) path for a server and share name. For example, all the following are acceptable paths: -- "c:\\\\MyDir\\\\MyFile.txt" in C#, or "c:\\MyDir\\MyFile.txt" in Visual Basic. - -- "c:\\\\MyDir" in C#, or "c:\\MyDir" in Visual Basic. - -- "MyDir\\\\MySubdir" in C#, or "MyDir\\MySubDir" in Visual Basic. - -- "\\\\\\\\MyServer\\\\MyShare" in C#, or "\\\\MyServer\\MyShare" in Visual Basic. +- "c:\\\\MyDir\\\\MyFile.txt" in C#, or "c:\\MyDir\\MyFile.txt" in Visual Basic. +- "c:\\\\MyDir" in C#, or "c:\\MyDir" in Visual Basic. +- "MyDir\\\\MySubdir" in C#, or "MyDir\\MySubDir" in Visual Basic. +- "\\\\\\\\MyServer\\\\MyShare" in C#, or "\\\\MyServer\\MyShare" in Visual Basic. Because all these operations are performed on strings, it is impossible to verify that the results are valid in all scenarios. For example, the method parses a string that you pass to it and returns the extension from that string. However, this does not mean that a file with that extension exists on the disk. @@ -275,7 +268,6 @@ The following example displays field values on Windows and ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more of the invalid characters defined in . File path formats on Windows systems File and Stream I/O How to: Read Text from a File @@ -297,7 +289,7 @@ The following example displays field values on Windows and ## Remarks -This method is intended to concatenate individual strings into a single string that represents a file path. However, if an argument other than the first contains a rooted path, any previous path components are ignored, and the returned string begins with that rooted path component. As an alternative to the `Combine` method, consider using the or methods (not available in .NET Framework). +This method is intended to concatenate individual strings into a single string that represents a file path. However, if an argument other than the first contains a rooted path, any previous path components are ignored, and the returned string begins with that rooted path component. As an alternative to the `Combine` method, consider using the or methods. > [!IMPORTANT] > This method assumes that the first argument is an absolute path and that the following argument or arguments are relative paths. If this is not the case, and particularly if any subsequent arguments are strings input by the user, call the or method instead. @@ -424,8 +416,6 @@ If any element in `paths` but the last one is not a drive and does not end with The parameters are not parsed if they have white space. - .NET Framework and .NET Core versions older than 2.1: Not all invalid characters for directory and file names are interpreted as unacceptable by the `Combine` method, because you can use these characters for search wildcard characters. For example, while `Path.Combine("c:\\", "*.txt")` might be invalid if you were to create a file from it, it is valid as a search string. It is therefore successfully interpreted by the `Combine` method. - ## Examples The following example combines an array of strings into a path. @@ -434,7 +424,6 @@ If any element in `paths` but the last one is not a drive and does not end with ]]> - .NET Framework and .NET Core versions older than 2.1: One of the strings in the array contains one or more of the invalid characters defined in . One of the strings in the array is . File path formats on Windows systems @@ -502,8 +491,6 @@ If any element in `paths` but the last one is not a drive and does not end with The parameters are not parsed if they have white space. Therefore, if `path2` includes white space (for example, " \\file.txt "), the method appends `path2` to `path1` instead of returning only `path2`. - .NET Framework and .NET Core versions older than 2.1: Not all invalid characters for directory and file names are interpreted as unacceptable by the `Combine` method, because you can use these characters for search wildcard characters. For example, while `Path.Combine("c:\\", "*.txt")` might be invalid if you were to create a file from it, it is valid as a search string. It is therefore successfully interpreted by the `Combine` method. - For a list of common I/O tasks, see [Common I/O Tasks](/dotnet/standard/io/common-i-o-tasks). ## Examples @@ -514,7 +501,6 @@ If any element in `paths` but the last one is not a drive and does not end with ]]> - .NET Framework and .NET Core versions older than 2.1: or contains one or more of the invalid characters defined in . or is . File path formats on Windows systems @@ -590,8 +576,6 @@ If any element in `paths` but the last one is not a drive and does not end with The parameters are not parsed if they have white space. Therefore, if `path2` includes white space (for example, " \\file.txt "), the method appends `path2` to `path1`. - .NET Framework and .NET Core versions older than 2.1: Not all invalid characters for directory and file names are interpreted as unacceptable by the `Combine` method, because you can use these characters for search wildcard characters. For example, while `Path.Combine("c:\\", "*.txt")` might be invalid if you were to create a file from it, it is valid as a search string. It is therefore successfully interpreted by the `Combine` method. - ## Examples @@ -602,7 +586,6 @@ If any element in `paths` but the last one is not a drive and does not end with ]]> - .NET Framework and .NET Core versions older than 2.1: , , or contains one or more of the invalid characters defined in . , , or is . File path formats on Windows systems @@ -675,8 +658,6 @@ If any element in `paths` but the last one is not a drive and does not end with The parameters are not parsed if they have white space. Therefore, if `path2` includes white space (for example, " \\file.txt "), the method appends `path2` to `path1`. - .NET Framework and .NET Core versions older than 2.1: Not all invalid characters for directory and file names are interpreted as unacceptable by the `Combine` method, because you can use these characters for search wildcard characters. For example, while `Path.Combine("c:\\", "*.txt")` might be invalid if you were to create a file from it, it is valid as a search string. It is therefore successfully interpreted by the `Combine` method. - ## Examples @@ -687,7 +668,6 @@ If any element in `paths` but the last one is not a drive and does not end with ]]> - .NET Framework and .NET Core versions older than 2.1: , , , or contains one or more of the invalid characters defined in . , , , or is . File path formats on Windows systems @@ -743,7 +723,7 @@ If any element in `paths` but the last one is not a drive and does not end with and `DirectorySeparatorChar` are both valid for separating directory levels in a path string. -When you are using .NET Core to develop applications that run on multiple platforms: +When you are developing applications that run on multiple platforms: - If you prefer to hard-code the directory separator character, you should use the forward slash (`/`) character. It is the only recognized directory separator character on Unix systems, as the output from the example shows, and is the on Windows. @@ -1041,7 +1021,6 @@ For a list of common I/O tasks, see [Common I/O tasks](/dotnet/standard/io/commo ]]> - .NET Framework and .NET Core versions older than 2.1: The parameter contains invalid characters, is empty, or contains only white spaces. The parameter is longer than the system-defined maximum length. File path formats on Windows systems File and Stream I/O @@ -1169,7 +1148,6 @@ This method obtains the extension of `path` by searching `path` for a period (.) ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more of the invalid characters defined in . File path formats on Windows systems File and Stream I/O How to: Read Text from a File @@ -1302,7 +1280,6 @@ For a list of common I/O tasks, see [Common I/O Tasks](/dotnet/standard/io/commo ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more of the invalid characters defined in . File path formats on Windows systems File and Stream I/O How to: Read Text from a File @@ -1424,7 +1401,6 @@ For a list of common I/O tasks, see [Common I/O Tasks](/dotnet/standard/io/commo ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more of the invalid characters defined in . File path formats on Windows systems File and Stream I/O How to: Read Text from a File @@ -1499,7 +1475,7 @@ For a list of common I/O tasks, see [Common I/O Tasks](/dotnet/standard/io/commo If a path contains no significant characters, it is invalid unless it contains one or more "." characters followed by any number of spaces; then it will be parsed as either "." or "..". -.NET Core 1.1 and later versions and .NET Framework 4.6.2 and later versions also support paths that include device names, such as "\\\\?\\C:\\". +The path can include device names, such as "\\\\?\\C:\\". For more information on file path formats on Windows, see [File path formats on Windows systems](/dotnet/standard/io/file-path-formats). For a list of common I/O tasks, see [Common I/O Tasks](/dotnet/standard/io/common-i-o-tasks). @@ -1520,8 +1496,6 @@ For more information on file path formats on Windows, see [File path formats on The caller does not have the required permissions. is . - - .NET Framework only: contains a colon (":") that is not part of a volume identifier (for example, "c:\\"). The specified path, file name, or both exceed the system-defined maximum length. File path formats on Windows systems File and Stream I/O @@ -1774,22 +1748,15 @@ A `ReadOnlySpan` is "effectively empty" if: Possible patterns for the read-only character span returned by this method are as follows: - (`path` was . - - (`path` specified a relative path on the current drive or volume). - - "/" (Unix: `path` specified an absolute path on the current drive). - - "X:" (Windows: `path` specified a relative path on a drive, where *X* represents a drive or volume letter). - - "X:\\" (Windows: `path` specified an absolute path on a given drive). - - "\\\\ComputerName\\SharedFolder" (Windows: a UNC path). - -- "\\\\?\\C:" (Windows: a DOS device path, supported in .NET versions and in .NET Framework 4.6.2 and later versions). +- "\\\\?\\C:" (Windows: a DOS device path). For more information on file paths on Windows, see [File path formats on Windows systems](/dotnet/standard/io/file-path-formats). For a list of common I/O tasks, see [Common I/O Tasks](/dotnet/standard/io/common-i-o-tasks). - ]]> File path formats on Windows systems @@ -1860,7 +1827,7 @@ For more information on file paths on Windows, see [File path formats on Windows This method does not verify that the path or file exists. -This method will normalize directory separators. +This method normalizes directory separators. A string is "effectively empty" if: @@ -1870,22 +1837,17 @@ A string is "effectively empty" if: Possible patterns for the string returned by this method are as follows: - `null` (`path` was null or an empty string). - - An empty string (`path` specified a relative path on the current drive or volume). - - "/" (Unix: `path` specified an absolute path on the current drive). - - "X:" (Windows: `path` specified a relative path on a drive, where *X* represents a drive or volume letter). - - "X:\\" (Windows: `path` specified an absolute path on a given drive). - - "\\\\ComputerName\\SharedFolder" (Windows: a UNC path). - -- "\\\\?\\C:" (Windows: a DOS device path, supported in .NET versions and in .NET Framework 4.6.2 and later versions). +- "\\\\?\\C:" (Windows: a DOS device path). For more information on file paths on Windows, see [File path formats on Windows systems](/dotnet/standard/io/file-path-formats). For a list of common I/O tasks, see [Common I/O Tasks](/dotnet/standard/io/common-i-o-tasks). ## Examples + The following example demonstrates a use of the `GetPathRoot` method. :::code language="csharp" source="~/snippets/csharp/System.IO/Path/ChangeExtension/pathmembers.cs" id="Snippet8"::: @@ -1893,11 +1855,6 @@ The following example demonstrates a use of the `GetPathRoot` method. ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more of the invalid characters defined in . - --or- - -.NET Framework only: was passed to . File path formats on Windows systems File and Stream I/O How to: Read Text from a File @@ -2079,8 +2036,6 @@ Paths are resolved by calling the method befo This method creates a temporary file with a *.tmp* file extension and returns the path to it. The temporary file is created within the user's temporary folder, which is the path returned by the method. -On .NET Framework, the method raises an if it's used to create more than 65535 files without deleting previous temporary files. This limitation does not exist on operating systems other than Windows. Starting in .NET 8, the limitation does not exist on *any* operating system. - The method will raise an if no unique temporary file name is available. To resolve this error, delete all unneeded temporary files. For a list of common I/O tasks, see [Common I/O Tasks](/dotnet/standard/io/common-i-o-tasks). @@ -2327,7 +2282,6 @@ A trailing period in `path` is not considered an extension. ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more of the invalid characters defined in . File path formats on Windows systems File and Stream I/O How to: Read Text from a File @@ -2397,7 +2351,7 @@ A trailing period in `path` is not considered an extension. The array returned from this method is not guaranteed to contain the complete set of characters that are invalid in file and directory names. The full set of invalid characters can vary by file system. Refer to the remarks to learn what the set of characters returned by this field is. > [!CAUTION] -> Do not use if you think your code might execute in the same application domain as untrusted code. is an array, so its elements can be overwritten. If untrusted code overwrites elements of , it might cause your code to malfunction in ways that could be exploited. +> Do not use if you think your code might execute alongside untrusted code. is an array, so its elements can be overwritten. If untrusted code overwrites elements of , it might cause your code to malfunction in ways that could be exploited. ]]> @@ -2661,7 +2615,6 @@ Note that rooted paths can be either absolute (that is, fully qualified) or rela ]]> - .NET Framework and .NET Core versions older than 2.1: contains one or more of the invalid characters defined in . File path formats on Windows systems File and Stream I/O How to: Read Text from a File diff --git a/xml/System.IO/PathTooLongException.xml b/xml/System.IO/PathTooLongException.xml index 09dec543cda..24dd5d5c737 100644 --- a/xml/System.IO/PathTooLongException.xml +++ b/xml/System.IO/PathTooLongException.xml @@ -58,7 +58,7 @@ ## Remarks -Starting with apps running under .NET Framework 4.6.2, .NET supports long paths in excess of 260 (or `MAX_PATH`) characters. The runtime throws a under the following conditions: +.NET supports long paths in excess of 260 (or `MAX_PATH`) characters. The runtime throws a under the following conditions: - The operating system returns `COR_E_PATHTOOLONG` or its equivalent. - The length of the path exceeds (32,767) characters. diff --git a/xml/System.IO/Stream.xml b/xml/System.IO/Stream.xml index c7862d4d161..57e51440d0a 100644 --- a/xml/System.IO/Stream.xml +++ b/xml/System.IO/Stream.xml @@ -109,16 +109,14 @@ Disposing a object flushes any buffered data, and essentially calls the method for you. also releases operating system resources such as file handles, network connections, or memory used for any internal buffering. The class provides the capability of wrapping a buffered stream around another stream in order to improve read and write performance. - Starting with the .NET Framework 4.5, the class includes async methods to simplify asynchronous operations. An async method contains `Async` in its name, such as , , , and . These methods enable you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. +The class includes async methods to simplify asynchronous operations. An async method contains `Async` in its name, such as , , , and . These methods enable you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in desktop apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. - When used in a Windows 8.x Store app, includes two extension methods: and . These methods convert a object to a stream in the Windows Runtime. You can also convert a stream in the Windows Runtime to a object by using the and methods. For more information, see [How to: Convert Between .NET Framework Streams and Windows Runtime Streams](/dotnet/standard/io/how-to-convert-between-dotnet-streams-and-winrt-streams) + includes two extension methods, and , to convert a object to a stream in the Windows Runtime. You can also convert a stream in the Windows Runtime to a object by using the and methods. For more information, see [How to: Convert Between .NET Streams and Windows Runtime Streams](/dotnet/standard/io/how-to-convert-between-dotnet-streams-and-winrt-streams) Some stream implementations perform local buffering of the underlying data to improve performance. For such streams, you can use the or method to clear any internal buffers and ensure that all data has been written to the underlying data source or repository. If you need a stream with no backing store (also known as a bit bucket), use the field to retrieve an instance of a stream that is designed for this purpose. - - ## Examples The following example demonstrates how to use two objects to asynchronously copy the files from one directory to another directory. The class derives from the class. Notice that the event handler for the control is marked with the `async` modifier because it calls an asynchronous method. @@ -136,7 +134,7 @@ File and Stream I/O - How to: Convert Between .NET Framework Streams and Windows Runtime Streams + How to: Convert Between .NET Streams and Windows Runtime Streams @@ -266,7 +264,8 @@ and to implement asynchronous I/O operations. These methods are still available in the .NET Framework 4.5 to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous I/O operations more easily. + +This method is available to support legacy code; however, the newer async methods, such as , , , and , help you implement asynchronous I/O operations more easily. The default implementation of `BeginRead` on a stream calls the method synchronously, which means that `Read` might block on some streams. However, instances of classes such as `FileStream` and `NetworkStream` fully support asynchronous operations if the instances have been opened asynchronously. Therefore, calls to `BeginRead` will not block on those streams. You can override `BeginRead` (by using async delegates, for example) to provide asynchronous behavior. @@ -366,7 +365,8 @@ and to implement asynchronous I/O operations. These methods are still available in the .NET Framework 4.5 to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous I/O operations more easily. + +This method is available to support legacy code; however, the newer async methods, such as , , , and , help you implement asynchronous I/O operations more easily. The default implementation of `BeginWrite` on a stream calls the method synchronously, which means that `Write` might block on some streams. However, instances of classes such as `FileStream` and `NetworkStream` fully support asynchronous operations if the instances have been opened asynchronously. Therefore, calls to `BeginWrite` will not block on those streams. You can override `BeginWrite` (by using async delegates, for example) to provide asynchronous behavior. @@ -925,7 +925,7 @@ method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. + The method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in desktop apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. Copying begins at the current position in the current stream. @@ -998,7 +998,7 @@ method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. + The method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in desktop apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. Copying begins at the current position in the current stream. @@ -1059,7 +1059,7 @@ method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. + The method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in desktop apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. If the operation is canceled before it completes, the returned task contains the value for the property. @@ -1129,7 +1129,7 @@ method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. + The method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in desktop apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. If the operation is canceled before it completes, the returned task contains the value for the property. @@ -1407,7 +1407,7 @@ method enables you to perform a resource-intensive dispose operation without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. + The method enables you to perform a resource-intensive dispose operation without blocking the main thread. This performance consideration is particularly important in desktop apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. This method disposes the stream by writing any changes to the backing store and closing the stream to release resources. @@ -1469,7 +1469,8 @@ and to implement asynchronous I/O operations. These methods are still available in the .NET Framework 4.5 to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous I/O operations more easily. + +This method is available to support legacy code; however, the newer async methods, such as , , , and , help you implement asynchronous I/O operations more easily. Call `EndRead` to determine how many bytes were read from the stream. @@ -1544,7 +1545,8 @@ and to implement asynchronous I/O operations. These methods are still available in the .NET Framework 4.5 to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous I/O operations more easily. + +This method is available to support legacy code; however, the newer async methods, such as , , , and , help you implement asynchronous I/O operations more easily. `EndWrite` must be called exactly once on every from . @@ -2175,7 +2177,7 @@ method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. + The method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in desktop apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. Use the property to determine whether the current instance supports reading. @@ -2243,7 +2245,7 @@ method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. + The method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in desktop apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. Use the property to determine whether the current instance supports reading. @@ -2324,7 +2326,7 @@ method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. + The method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in desktop apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. Use the property to determine whether the current instance supports reading. @@ -3251,7 +3253,7 @@ The range specified by the combination of and method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. + The method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in desktop apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. Use the property to determine whether the current instance supports writing. @@ -3319,7 +3321,7 @@ The range specified by the combination of and method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. + The method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in desktop apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. Use the property to determine whether the current instance supports writing. @@ -3400,7 +3402,7 @@ The range specified by the combination of and method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. + The method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in desktop apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. Use the property to determine whether the current instance supports writing.