You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hub/apps/develop/files/best-practices-writing-files.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ The **Write** methods of the [**FileIO**](/uwp/api/Windows.Storage.FileIO) and [
35
35
36
36
A [**StorageFile**](/uwp/api/windows.storage.storagefile) object is not a file handle like the native Win32 programming model. Instead, a [**StorageFile**](/uwp/api/windows.storage.storagefile) is a representation of a file with methods to manipulate its contents.
37
37
38
-
Understanding this concept is useful when performing I/O with a **StorageFile**. For example, the [Writing to a file](quickstart-reading-and-writing-files.md#writing-to-a-file) section presents three ways to write to a file:
38
+
Understanding this concept is useful when performing I/O with a **StorageFile**. For example, the [Writing to a file](create-read-write-files.md#writing-to-a-file) section presents three ways to write to a file:
39
39
40
40
* Using the [**FileIO.WriteTextAsync**](/uwp/api/windows.storage.fileio.writetextasync) method.
41
41
* By creating a buffer and then calling the [**FileIO.WriteBufferAsync**](/uwp/api/windows.storage.fileio.writebufferasync) method.
@@ -129,7 +129,7 @@ The time values on the y-axis are omitted intentionally from this chart because
129
129
130
130
## I/O during app suspension
131
131
132
-
Your app must designed to handle suspension if you want to keep state information or metadata for use in later sessions. For background information about app suspension, see [App lifecycle](../launch-resume/app-lifecycle.md) and [this blog post](https://blogs.windows.com/buildingapps/2016/04/28/the-lifecycle-of-a-uwp-app/#qLwdmV5zfkAPMEco.97).
132
+
Your app must designed to handle suspension if you want to keep state information or metadata for use in later sessions. For background information about app suspension, see [App lifecycle](/windows/uwp/launch-resume/app-lifecycle) and [this blog post](https://blogs.windows.com/buildingapps/2016/04/28/the-lifecycle-of-a-uwp-app/#qLwdmV5zfkAPMEco.97).
133
133
134
134
Unless the OS grants extended execution to your app, when your app is suspended it has 5 seconds to release all its resources and save its data. For the best reliability and user experience, always assume the time you have to handle suspension tasks is limited. Keep in mind the following guidelines during the 5 second time period for handling suspension tasks:
135
135
@@ -190,4 +190,4 @@ The [Parallel Programming with .NET blog](https://devblogs.microsoft.com/pfxteam
190
190
191
191
## See also
192
192
193
-
*[Create, write, and read a file](quickstart-reading-and-writing-files.md)
193
+
*[Create, write, and read a file](create-read-write-files.md)
Copy file name to clipboardExpand all lines: hub/apps/develop/files/create-read-write-files.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,11 +29,11 @@ Read and write a file using a [**StorageFile**](/uwp/api/windows.storage.storage
29
29
30
30
-**Understand async programming for Universal Windows Platform (UWP) apps**
31
31
32
-
You can learn how to write asynchronous apps in C# or Visual Basic, see [Call asynchronous APIs in C# or Visual Basic](../threading-async/call-asynchronous-apis-in-csharp-or-visual-basic.md). To learn how to write asynchronous apps in C++/WinRT, see [Concurrency and asynchronous operations with C++/WinRT](../cpp-and-winrt-apis/concurrency.md). To learn how to write asynchronous apps in C++/CX, see [Asynchronous programming in C++/CX](../threading-async/asynchronous-programming-in-cpp-universal-windows-platform-apps.md).
32
+
You can learn how to write asynchronous apps in C# or Visual Basic, see [Call asynchronous APIs in C# or Visual Basic](/windows/uwp/threading-async/call-asynchronous-apis-in-csharp-or-visual-basic). To learn how to write asynchronous apps in C++/WinRT, see [Concurrency and asynchronous operations with C++/WinRT](/windows/uwp/cpp-and-winrt-apis/concurrency). To learn how to write asynchronous apps in C++/CX, see [Asynchronous programming in C++/CX](/windows/uwp/threading-async/asynchronous-programming-in-cpp-universal-windows-platform-apps).
33
33
34
34
-**Know how to get the file that you want to read from, write to, or both**
35
35
36
-
You can learn how to get a file by using a file picker in [Open files and folders with a picker](quickstart-using-file-and-folder-pickers.md).
36
+
You can learn how to get a file by using a file picker in [Open files and folders with a picker](/windows/uwp/files/quickstart-using-file-and-folder-pickers).
37
37
38
38
## Creating a file
39
39
@@ -248,7 +248,7 @@ Await Windows.Storage.FileIO.WriteTextAsync(sampleFile, "Swift as a shadow")
2. Next, getanoutputstreambycallingthe [**IRandomAccessStream.GetOutputStreamAt**](/uwp/api/windows.storage.streams.irandomaccessstream.getoutputstreamat) methodfromthe `stream`. Ifyou're using C#, then enclose this in a **using** statement to manage the output stream'slifetime. Ifyou're using [C++/WinRT](../cpp-and-winrt-apis/intro-to-using-cpp-with-winrt.md), then you can control its lifetime by enclosing it in a block, or setting it to `nullptr` when you'redonewithit.
251
+
2. Next, getanoutputstreambycallingthe [**IRandomAccessStream.GetOutputStreamAt**](/uwp/api/windows.storage.streams.irandomaccessstream.getoutputstreamat) methodfromthe `stream`. Ifyou're using C#, then enclose this in a **using** statement to manage the output stream'slifetime. Ifyou're using [C++/WinRT](/windows/uwp/cpp-and-winrt-apis/intro-to-using-cpp-with-winrt), then you can control its lifetime by enclosing it in a block, or setting it to `nullptr` when you'redonewithit.
252
252
253
253
```csharp
254
254
using (varoutputStream=stream.GetOutputStreamAt(0))
@@ -325,7 +325,7 @@ Await Windows.Storage.FileIO.WriteTextAsync(sampleFile, "Swift as a shadow")
325
325
326
326
**Bestpracticesforwritingtoafile**
327
327
328
-
Foradditionaldetailsandbestpracticeguidance, see [Bestpracticesforwritingtofiles](best-practices-for-writing-to-files.md).
328
+
Foradditionaldetailsandbestpracticeguidance, see [Bestpracticesforwritingtofiles](best-practices-writing-files.md).
329
329
330
330
## Reading from a file
331
331
@@ -550,4 +550,4 @@ Dim text As String = Await Windows.Storage.FileIO.ReadTextAsync(sampleFile)
Copy file name to clipboardExpand all lines: hub/apps/develop/files/determine-availability-microsoft-onedrive-files.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Determine if a Microsoft OneDrive file is available using the [**StorageFile.IsA
22
22
23
23
-**Understand async programming for Universal Windows Platform (UWP) apps**
24
24
25
-
You can learn how to write asynchronous apps in C# or Visual Basic, see [Call asynchronous APIs in C# or Visual Basic](../threading-async/call-asynchronous-apis-in-csharp-or-visual-basic.md). To learn how to write asynchronous apps in C++, see [Asynchronous programming in C++](../threading-async/asynchronous-programming-in-cpp-universal-windows-platform-apps.md).
25
+
You can learn how to write asynchronous apps in C# or Visual Basic, see [Call asynchronous APIs in C# or Visual Basic](/windows/uwp/threading-async/call-asynchronous-apis-in-csharp-or-visual-basic). To learn how to write asynchronous apps in C++, see [Asynchronous programming in C++](/windows/uwp/threading-async/asynchronous-programming-in-cpp-universal-windows-platform-apps).
Copy file name to clipboardExpand all lines: hub/apps/develop/files/fast-file-properties.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,16 +12,16 @@ Learn how to quickly gather a list of files and their properties from a library
12
12
13
13
Prerequisites
14
14
-**Asynchronous programming for Universal Windows Platform (UWP) apps**
15
-
You can learn how to write asynchronous apps in C# or Visual Basic, see [Call asynchronous APIs in C# or Visual Basic](../threading-async/call-asynchronous-apis-in-csharp-or-visual-basic.md). To learn how to write asynchronous apps in C++, see [Asynchronous programming in C++](../threading-async/asynchronous-programming-in-cpp-universal-windows-platform-apps.md).
15
+
You can learn how to write asynchronous apps in C# or Visual Basic, see [Call asynchronous APIs in C# or Visual Basic](/windows/uwp/threading-async/call-asynchronous-apis-in-csharp-or-visual-basic). To learn how to write asynchronous apps in C++, see [Asynchronous programming in C++](/windows/uwp/threading-async/asynchronous-programming-in-cpp-universal-windows-platform-apps).
16
16
-**Access permissions to Libraries**
17
17
The code in these examples requires the **picturesLibrary** capability, but your file location may require a different capability, or no capability at all. To learn more, see [File access permissions](./file-access-permissions.md).
18
18
-**Simple file enumeration**
19
-
This example uses [QueryOptions](/uwp/api/Windows.Storage.Search.QueryOptions) to set a few advanced enumeration properties. To learn more about just getting a simple list of files for a smaller directory, see [Enumerate and query files and folders](./quickstart-listing-files-and-folders.md).
19
+
This example uses [QueryOptions](/uwp/api/Windows.Storage.Search.QueryOptions) to set a few advanced enumeration properties. To learn more about just getting a simple list of files for a smaller directory, see [Enumerate and query files and folders](./list-files-folders.md).
20
20
21
21
## Usage
22
22
Many apps need to list the properties of a group of files, but don't always need to interact with the files directly. For example, a music app plays (opens) one file at a time, but it needs the properties of all of the files in a folder so the app can show the song queue, or so the user can choose a valid file to play.
23
23
24
-
The examples on this page shouldn't be used in apps that will modify the metadata of every file or apps that interact with all the resulting StorageFiles beyond reading their properties. See [Enumerate and query files and folders](./quickstart-listing-files-and-folders.md) for more information.
24
+
The examples on this page shouldn't be used in apps that will modify the metadata of every file or apps that interact with all the resulting StorageFiles beyond reading their properties. See [Enumerate and query files and folders](./list-files-folders.md) for more information.
25
25
26
26
## Enumerate all the pictures in a location
27
27
In this example, we will
@@ -113,7 +113,7 @@ Apps can request the user to add the location to the index using [StorageLibrary
113
113
114
114
## See also
115
115
[QueryOptions API Reference](/uwp/api/windows.storage.search.queryoptions)
116
-
[Enumerate and query files and folders](./quickstart-listing-files-and-folders.md)
116
+
[Enumerate and query files and folders](./list-files-folders.md)
@@ -262,10 +262,10 @@ The following table lists additional locations that you can access by declaring
262
262
|----------|------------|---------------------|
263
263
| All files that the user has access to. For example: documents, pictures, photos, downloads, desktop, OneDrive, etc. | **broadFileSystemAccess**<br><br>This is a restricted capability. Access is configurable in **Settings** > **Privacy** > **File system**. Because users can grant or deny the permission any time in **Settings**, you should ensure that your app is resilient to those changes. If you find that your app does not have access, you may choose to prompt the user to change the setting by providing a link to the [Windows file system access and privacy](https://support.microsoft.com/windows/-windows-file-system-access-and-privacy-a7d90b20-b252-0e7b-6a29-a3a688e5c7be) article. Note that the user must close the app, toggle the setting, and restart the app. If they toggle the setting while the app is running, the platform will suspend your app so that you can save the state, then forcibly terminate the app in order to apply the new setting. In the April 2018 update, the default for the permission is On. In the October 2018 update, the default is Off.<br /><br />If you submit an app to the Store that declares this capability, you will need to supply additional descriptions of why your app needs this capability, and how it intends to use it.<br/><br/>This capability works for APIs in the [**Windows.Storage**](/uwp/api/Windows.Storage) namespace. See the **Example** section at the end of this article for an example of how to enable this capability in your app.<br/><br/>**Note:** This capability is not supported on Xbox. | n/a |
264
264
|Documents|**documentsLibrary**<br><br>Note:YoumustaddFileTypeAssociationstoyourappmanifestthatdeclarespecificfiletypesthatyourappcanaccessinthislocation. <br><br>Usethiscapabilityifyourapp:<br>-Facilitatescross-platformofflineaccesstospecificOneDrivecontentusingvalidOneDriveURLsorResourceIDs<br>-Savesopenfilestotheuser's OneDrive automatically while offline | [KnownFolders.DocumentsLibrary](/uwp/api/windows.storage.knownfolders.documentslibrary) |
Copy file name to clipboardExpand all lines: hub/apps/develop/files/file-properties.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Get properties—top-level, basic, and extended—for a file represented by a [*
24
24
25
25
-**Understand async programming for Universal Windows Platform (UWP) apps**
26
26
27
-
You can learn how to write asynchronous apps in C# or Visual Basic, see [Call asynchronous APIs in C# or Visual Basic](../threading-async/call-asynchronous-apis-in-csharp-or-visual-basic.md). To learn how to write asynchronous apps in C++, see [Asynchronous programming in C++](../threading-async/asynchronous-programming-in-cpp-universal-windows-platform-apps.md).
27
+
You can learn how to write asynchronous apps in C# or Visual Basic, see [Call asynchronous APIs in C# or Visual Basic](/windows/uwp/threading-async/call-asynchronous-apis-in-csharp-or-visual-basic). To learn how to write asynchronous apps in C++, see [Asynchronous programming in C++](/windows/uwp/threading-async/asynchronous-programming-in-cpp-universal-windows-platform-apps).
0 commit comments