Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vector-man/objectivepaths
ObjectivePaths is a wrapper for .NET filesystem operations, treating every filesystem item as an object.
https://github.com/vector-man/objectivepaths
abstraction async-await csharp directories directory dotnet-core dotnet-framework dotnetstandard-2-0 file files filesystem-library linq paths
Last synced: 12 days ago
JSON representation
ObjectivePaths is a wrapper for .NET filesystem operations, treating every filesystem item as an object.
- Host: GitHub
- URL: https://github.com/vector-man/objectivepaths
- Owner: vector-man
- License: other
- Created: 2023-06-12T10:59:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-15T15:31:10.000Z (over 1 year ago)
- Last Synced: 2024-11-14T22:34:48.556Z (2 months ago)
- Topics: abstraction, async-await, csharp, directories, directory, dotnet-core, dotnet-framework, dotnetstandard-2-0, file, files, filesystem-library, linq, paths
- Language: C#
- Homepage:
- Size: 69.3 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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: [email protected]
Github: @vector-man.