Osaxely.ExtendedStorage 0.3.0

dotnet add package Osaxely.ExtendedStorage --version 0.3.0
NuGet\Install-Package Osaxely.ExtendedStorage -Version 0.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Osaxely.ExtendedStorage" Version="0.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Osaxely.ExtendedStorage --version 0.3.0
#r "nuget: Osaxely.ExtendedStorage, 0.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Osaxely.ExtendedStorage as a Cake Addin
#addin nuget:?package=Osaxely.ExtendedStorage&version=0.3.0

// Install Osaxely.ExtendedStorage as a Cake Tool
#tool nuget:?package=Osaxely.ExtendedStorage&version=0.3.0

Extended Storage Library

The Extended Storage library allows developers of UWP apps to access every file of the system. Extended Storage allows the following features:

  • Full access to the filesystem (Including hidden and operating system files) on any UWP device.
  • Writing and reading files.
  • Opening files in stream for further manipulations.
  • Archive system for Creation/Extraction.
  • Access to the external storage drives.
  • It is as easy to use as Windows.Storage API.

This powerful library was developed by myself and tunip3.

Additional details

In order to use that library, your app must declare the following capabilities:

  • runFullTrust
  • broadFileSystemAccess

Samples

These few samples show some simple features of that powerful library. A bunch of other features can be done such as Copying/Moving/Deleting or opening as a stream.

Getting a file and a folder

using ExtendedStorage;
using ExtendedStorage.Utils;
...
// Get a folder from path and a file from folder
EStorageFolder folder = EStorageFolder.GetFromPath(FOLDER_PATH); // Returns null if the folder was not found.
EStorageFile textFile = folder.GetFile("sample.txt"); // Get file from that folder, also returns null if the file was not found.

// Get a folder from another folder
EStorageFolder folder = EStorageFolder.GetFromPath(FOLDER_PATH);
EStorageFolder anotherFolder = folder.GetFolder("Other");

// Getting a file
EStorageFile file = EStorageFile.GetFromPath(FILE_PATH);

Reading a text file

That example assumes that we have a text file called sample.txt which contains Hello world.

using ExtendedStorage;
using ExtendedStorage.Utils;
...
EStorageFolder folder = EStorageFolder.GetFromPath(FOLDER_PATH); // Returns null if the folder was not found.
EStorageFile textFile = folder.GetFile("sample.txt"); // Get file from that folder, also returns null if the file was not found.

string content = textFile.ReadText(); // Read all the text.
System.Diagnostics.Debug.WriteLine($"File content: {content}");

Output: File content: Hello world

Writing to a text file

using ExtendedStorage;
using ExtendedStorage.Utils;
...
EStorageFolder folder = EStorageFolder.GetFromPath(FOLDER_PATH); // Returns null if the folder was not found.
EStorageFile textFile = folder.GetFile("sample.txt"); // Get file from that folder, also returns null if the file was not found.

textFile.WriteText("Hello world"); // Read all the text.
Product Compatible and additional computed target framework versions.
Universal Windows Platform uap was computed.  uap10.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.0 447 4/23/2022
0.2.0 393 4/22/2022
0.1.0 397 4/22/2022

First release of ExtendedStorage library.