NLog / NLog/NLog.Targets.MauiLog

Add Maui FileSystem LayoutRenderer

Open
#2 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
21
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Cache directory (Returns the LocalCacheFolder directory)

FileSystem.Current.CacheDirectory;

C:/Users/{MyName}/AppData/Local/Packages/{GUID}_{hash}/LocalCache/

App data directory (Returns the LocalFolder directory that is backed up to the cloud)

FileSystem.Current.AppDataDirectory;

C:/Users/{MyName}/AppData/Local/Packages/{GUID}_{hash}/LocalState/

For NetStandard (and others) then it can just return:

System.AppContext.BaseDirectory

https://docs.microsoft.com/en-us/dotnet/maui/platform-integration/storage/file-system-helpers?tabs=windows

Notice MAUI performs virtualization so when resolving SpecialFolder.LocalApplicationData then it automatically redirect to custom folder:

C:/Users/{MyName}/AppData/Local/Packages/{GUID}_{hash}/LocalCache/

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing Special Folder Layout Renderer and the linked .NET MAUI file-system helper documentation. Implement a Maui FileSystem LayoutRenderer that resolves CacheDirectory and AppDataDirectory on MAUI, with AppContext.BaseDirectory for .NET Standard and other platforms; done means these paths are returned correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.