FluentFileSystem (Microsoft .NET)

Overview of Library

Code Example of Usage (C#)

// First, create a FileSystemService.
var fileSystemService = FileSystemService(new FileSystem());

// Chaining:
// Get a file called "C.txt" in sub directory "A\B" of "C:\Users\":
var directory = fileSystemService.GetDirectory("C:\Users\");
var fileTwoLevelsDown = directory.GetDirectory("A").GetDirectry("B").GetFile("C.txt");

// LINQ Querying:
var bigFilesInDirectory = directory.GetFiles().Where(x=> x.Length > 10737418240);

// File Copying:
var newFile = directory.GetFile("newNonExistingFile.txt");
await fileTwoLevelsDown.CopyToAsync(newFile, overwrite: false, CancellationToken.None);

Get FluentFileSystem New (Completely Free MIT License)

Contributors to this project are welcome! Visit our official project page, here: YottaNext/FluentFileSystem (github.com)

Published by on November 21, 2023