Skip to content

Commit

Permalink
docs: essentials docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Sep 19, 2024
1 parent b0e858c commit 2336f8a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/plugins/essentials/filesystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@ uid: Plugins.Essentials.FileSystem
---

# File System

The `IFileSystem` interface from Prism Essentials provides a simple to use `DirectoryInfo` object for the AppData, Cache and Public file storage directories. From there is becomes a simple matter of normal File IO to locate, open and save files.

You can additionally check if a file exists within an App Package:

```cs
if (await fileSystem.FileExistsAsync("myFile.txt"))
{
using var stream = await fileSystem.OpenFileAsync("myFile.txt");
// Do something with the file stream.
}
```
19 changes: 19 additions & 0 deletions docs/plugins/essentials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,33 @@ The API is generally inspired by a combination of Xamarin/.NET MAUI Essentials a

Be sure to install `Prism.Plugin.Essentials.Maui`

```cs
builder.UseMauiApp<App>()
.UsePrism(prism => prism.UsePrismEssentials())
```

# [WPF](#tab/wpf)

Be sure to install `Prism.Plugin.Essentials.Wpf`

```cs
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
containerRegistry.UsePrismEssentials();
}
```

# [Uno Platform](#tab/uno-platform)

Be sure to install `Prism.Plugin.Essentials.Uno.WinUI`

```cs
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
containerRegistry.UsePrismEssentials();
}
```

---

> [!NOTE]
Expand Down

0 comments on commit 2336f8a

Please sign in to comment.