Skip to content

ObjectivePaths is a wrapper for .NET filesystem operations, treating every filesystem item as an object.

License

Notifications You must be signed in to change notification settings

vector-man/ObjectivePaths

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ObjectivePaths

ObjectivePaths for .NET is a library for filesystem operations. ObjectivePaths intends to make dealing with the filesystem easier, by treating each directory and file as an object.

Because of its design, custom filesystems can be plugged in to further enhance the library. View Demo project to see an example.

Examples:

// First, create a FileSystemService.
var fileSystemService = new LocalFileSystemService(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);

License

ObjectivePaths is dual-licensed. It is free to use in open-source projects that are compatible with the license AGPL. For closed source projects, a commercial license must be obtained from the Author, Michael D. Corbett. Due to the nature of dual-licensing, all contributions to to the official project's repositories must be released under the MIT License: (https://opensource.org/license/mit/). See LICENSE file for complete terms.

Contributors to this project are welcome to add their attribution information to the project under the Contributors section below:

Contributors

ObjectivePaths Copyright

Copyright (c) 2023 Michael D. Corbett

Email: michael@mdcorbett.com Github: @vector-man.

Releases

No releases published

Packages

No packages published

Languages