I have a very simple question. I'am trying load async some files which should be located in ApplicationData.Current.LocalFolder, but where is that directory? How I should add some files to this folder?
C# Windows 8 XAML - Where add ApplicationData files?
182 views Asked by user3127031 At
2
There are 2 answers
0
w.b
On
You can't access this location directly, instead get a reference to it as a StorageFolder:
StorageFolder localFolder = ApplicationData.Current.LocalFolder;
then you can add or get a file:
StorageFile file = await localFolder.CreateFileAsync(fileName);
StorageFile file = await localFolder.GetFileAsync(filename)
Related Questions in XAML
- Can't open new instance of another window in my app, in WPF .NET 8
- Visual Studio throwing DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION when I try to add a log
- Deeplinking in .net Maui "Window was allready created"
- MauiApp crashes only in release mode at sideswitch android.os.DeadObjectException
- Move .net maui contents below the drawer when it's opened
- Both `TouchBehavior.CommandParameter` and `TouchBehavior.LongPressCommandParameter` are always passed as `null` to `Command` and `LongPressCommand`
- How do I change the size of a window?
- How can I force a .NET MAUI ContentView to fill the entire remaining space of its FlexLayout parent?
- How can I get this ComboBox to bind, populate the dropdown and write back selected value on update?
- MAUI-Animating each element of a BindableLayout
- Correctly set RadioButtonGroup for CollectionView in .NET MAUI
- Multiple color schemes depending on build configuration in WPF-application
- Select XAML file based on build configuration (Visual Studio 2022, WPF)
- The type was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built
- How can I tell if a control is actually Visible in UWP?
Related Questions in ASYNCHRONOUS
- Callback and Microtask Queue of Java Script
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- Musical chairs: How can an asynchronous task cancel a synchronous one in c#?
- Asynchronously add to queue, synchronously process it
- Sending asynchronous requests without a pre-defined task list
- Value of a variable remains unaltered when assigned during a loop
- How to efficiently test some HTTP proxies for accessing a specific domain?
- How do you update Celery Task State/Status to see it in Flower?
- Why use tasks and async await in C# inline?
- NEXTJS14 DRIZZLE : Async issue when trying to post data from component into DB
- Blocking wait on future OUTSIDE of async functions
- save to csv simultaneously opcua datachange notification
- How can I load data from secrets-manager synchronously in TypeScript
- How to avoid timeout of API before ending?
- Conditional Synchronous Import in JavaScript, to export a simple object and not promise, possible?
Related Questions in STORE
- Set Expiration Date in python for specific keys
- How to auto login to microsoft store?
- Zustand slice pattern with property name as slice wrapper
- How to add an element to an array in ngrx with patchState (Angular Signal Store)
- Redux-saga persist with redux-toolkit, A non-serializable value was detected in an action, in the path: register
- ou have imported an APK or an app bundle signed with a certificate that is not yet valid You must sign either with a valid certificate
- Redux circular store ciruclar dependency
- Mutating an array in a store solidjs mutates the whole array
- How to Make Android game on google play store install on windows option on
- How to create a link for uploading an app to the microsoft store
- Is it possible to use custom variables in an extjs store?
- Vue3 - value of wrong store ref is being changed?
- How to add button and database connectivity in rectjs
- Last visit page tracking with vuex
- Pinia state initialized with async function but only after component is mounted
Related Questions in STORAGEFOLDER
- check if a folder exists uwp xamarin.forms
- StorageFolder GetFolderFromPathAsync throws Value does not fall within the expected range error
- StorageFolder.GetFilesAsync() is not working in HoloLens 2 (ARM64)
- How to save audio from using Windows.Media.SpeechSynthesis?
- UWP: UnauthorisedAccessException to LocalState folder
- Issue with using StorageFolder in a Unity UWP App deployed on a Hololens
- UWP app in VS2017 with Asset files set to Build Content - Copy Always are not copied to LocalState folder
- UWP Copy Multiple Files from Assets to Specified Location
- UWP StorageFile.CopyAsync() Throwing Error: "Value does not fall within the expected range."
- Get all storage files in root storage folder and all items in all sub storage folders
- absolute path file - is located in special KnownFolders.PicturesLibrary
- UWP Possible to run a process using StorageFile?
- Fastest way to move folder to another place in UWP
- How to replace a file that is currently opened?
- Can't display image from Removeable SD - UWP Windows IOT
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
In Windows 7 or 8, it is located here (Assuming Windows is installed on
C:drive):C:\Users\<your_user_name>\AppData\Localwhere
<your_user_name>will be the currently Logged in username on the PC.