Skip to content

Commit b18e0e8

Browse files
committed
Update README.md
1 parent fd1db17 commit b18e0e8

File tree

3 files changed

+158
-24
lines changed

3 files changed

+158
-24
lines changed

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
106106
### 4. Permanent Ban
107107

108108
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
109+
standards, including sustained inappropriate behavior, harassment of an
110110
individual, or aggression toward or disparagement of classes of individuals.
111111

112112
**Consequence**: A permanent ban from any sort of public interaction within

CONTRIBUTING.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Contributing to Virtual File System
2+
23
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
34

45
- Reporting a bug
@@ -8,10 +9,13 @@ We love your input! We want to make contributing to this project as easy and tra
89
- Becoming a maintainer
910

1011
## We develop with Github
12+
1113
We use github to host code, to track issues and feature requests, as well as accept pull requests.
1214

1315
## We use [Github Flow](https://guides.github.com/introduction/flow/index.html), so all code changes happen through pull requests
14-
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
16+
17+
Pull requests are the best way to propose changes to the codebase (we
18+
use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
1519

1620
1. Fork the repo and create your branch from `main`.
1721
2. If you've added code that should be tested, add tests.
@@ -21,13 +25,21 @@ Pull requests are the best way to propose changes to the codebase (we use [Githu
2125
6. Issue that pull request!
2226

2327
## Any contributions you make will be under the BSD-3-Clause Software License
24-
In short, when you submit code changes, your submissions are understood to be under the same [BSD-3-Clause](./LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern.
28+
29+
In short, when you submit code changes, your submissions are understood to be under the same [BSD-3-Clause](./LICENSE)
30+
that covers the project. Feel free to contact the maintainers if that's a concern.
2531

2632
## Report bugs using Github's [issues](https://github.com/Atypical-Consulting/VirtualFileSystem/issues)
27-
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/Atypical-Consulting/VirtualFileSystem/issues/new); it's that easy!
33+
34+
We use GitHub issues to track public bugs. Report a bug
35+
by [opening a new issue](https://github.com/Atypical-Consulting/VirtualFileSystem/issues/new); it's that easy!
2836

2937
## Write bug reports with detail, background, and sample code
30-
[This is an example](http://stackoverflow.com/q/12488905/180626) of a well-written bug report, and I think it's not a bad model. Here's [also a guide from Software Testing Help](https://www.softwaretestinghelp.com/how-to-write-good-bug-report/), which is a bit more in-depth.
38+
39+
[This is an example](http://stackoverflow.com/q/12488905/180626) of a well-written bug report, and I think it's not a
40+
bad model.
41+
Here's [also a guide from Software Testing Help](https://www.softwaretestinghelp.com/how-to-write-good-bug-report/),
42+
which is a bit more in-depth.
3143

3244
**Great Bug Reports** tend to have:
3345

@@ -42,10 +54,14 @@ We use GitHub issues to track public bugs. Report a bug by [opening a new issue]
4254
People *love* thorough bug reports. I'm not even kidding.
4355

4456
## Use a Consistent Coding Style
45-
An editorconfig file is provided to help with this.
57+
58+
An editorconfig file is provided to help with this.
4659

4760
## License
61+
4862
By contributing, you agree that your contributions will be licensed under its BSD-3-Clause License.
4963

5064
## References
51-
This document was adapted from the open-source contribution gist by [briandk](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62)
65+
66+
This document was adapted from the open-source contribution gist
67+
by [briandk](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62)

README.md

Lines changed: 135 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,170 @@
22

33
A virtual file system implementation in modern C#.
44

5-
When writing applications in .NET, you often need to write or read the contents of a file. .NET provides `System.IO`
6-
namespace dedicated to this purpose. But how do we deal with the filesystem when testing our code?
7-
8-
"Virtual File System" is an attempt to solve this problem. Currently, this library is at an early stage of development.
9-
If you need additional functionality, I invite you to open an issue to discuss it.
10-
11-
## Badges
12-
13-
_Social buttons_
14-
155
[![Atypical-Consulting - VirtualFileSystem](https://img.shields.io/static/v1?label=Atypical-Consulting&message=VirtualFileSystem&color=blue&logo=github)](https://github.com/Atypical-Consulting/VirtualFileSystem "Go to GitHub repo")
166
[![License: BSD-3-Clause](https://img.shields.io/badge/License-BSD--3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
177
[![stars - VirtualFileSystem](https://img.shields.io/github/stars/Atypical-Consulting/VirtualFileSystem?style=social)](https://github.com/Atypical-Consulting/VirtualFileSystem)
188
[![forks - VirtualFileSystem](https://img.shields.io/github/forks/Atypical-Consulting/VirtualFileSystem?style=social)](https://github.com/Atypical-Consulting/VirtualFileSystem)
199

20-
_Repo metadata_
21-
2210
[![GitHub tag](https://img.shields.io/github/tag/Atypical-Consulting/VirtualFileSystem?include_prereleases=&sort=semver&color=blue)](https://github.com/Atypical-Consulting/VirtualFileSystem/releases/)
2311
[![issues - VirtualFileSystem](https://img.shields.io/github/issues/Atypical-Consulting/VirtualFileSystem)](https://github.com/Atypical-Consulting/VirtualFileSystem/issues)
2412
[![GitHub pull requests](https://img.shields.io/github/issues-pr/Atypical-Consulting/VirtualFileSystem)](https://github.com/Atypical-Consulting/VirtualFileSystem/pulls)
2513
[![GitHub contributors](https://img.shields.io/github/contributors/Atypical-Consulting/VirtualFileSystem)](https://github.com/Atypical-Consulting/VirtualFileSystem/graphs/contributors)
2614
[![GitHub last commit](https://img.shields.io/github/last-commit/Atypical-Consulting/VirtualFileSystem)](https://github.com/Atypical-Consulting/VirtualFileSystem/commits/master)
2715

28-
_Call-to-Action buttons_
16+
[![NuGet](https://img.shields.io/nuget/v/Atypical.VirtualFileSystem.svg)](https://www.nuget.org/packages/Atypical.VirtualFileSystem)
17+
[![NuGet](https://img.shields.io/nuget/dt/Atypical.VirtualFileSystem.svg)](https://www.nuget.org/packages/Atypical.VirtualFileSystem)
18+
19+
## Table of contents
20+
21+
<!-- TOC -->
22+
* [Virtual File System](#virtual-file-system)
23+
* [Table of contents](#table-of-contents)
24+
* [Introduction](#introduction)
25+
* [What is a virtual file system and why should I use it?](#what-is-a-virtual-file-system-and-why-should-i-use-it)
26+
* [Features](#features)
27+
* [We use the lastest C# features](#we-use-the-lastest-c-features)
28+
* [Installation](#installation)
29+
* [NuGet](#nuget)
30+
* [Source](#source)
31+
* [Usage](#usage)
32+
* [Creating a virtual file system, add some files and print the content of the root directory as an ASCII tree](#creating-a-virtual-file-system-add-some-files-and-print-the-content-of-the-root-directory-as-an-ascii-tree)
33+
* [Documentation](#documentation)
34+
* [Contributing](#contributing)
35+
* [License](#license)
36+
* [Contact](#contact)
37+
* [Acknowledgements](#acknowledgements)
38+
* [Changelog](#changelog)
39+
* [Contributors](#contributors)
40+
<!-- TOC -->
41+
42+
## Introduction
2943

30-
[![View site - GH Pages](https://img.shields.io/badge/View_site-GH_Pages-2ea44f?style=for-the-badge)](https://atypical-consulting.github.io/VirtualFileSystem/)
31-
[![view - Documentation](https://img.shields.io/badge/view-Documentation-blue?style=for-the-badge)](/docs/ "Go to project documentation")
44+
When writing applications in .NET, you often need to write or read the contents of a file. .NET provides `System.IO`
45+
namespace dedicated to this purpose. But how do we deal with the filesystem when testing our code?
3246

33-
## What is a virtual file system and why should I use it?
47+
**Virtual File System** is an attempt to solve this problem. Currently, this library is at an early stage of
48+
development. If you need additional functionality, I invite you to open an issue to discuss it.
49+
50+
### What is a virtual file system and why should I use it?
3451

3552
A virtual file system is a data structure that represents a file system in memory. It is used to simulate a file system
3653
on a computer. It is useful for testing purposes, for example, when you want to test a file system without actually
3754
creating files on the hard drive.
3855

39-
## We use the lastest C# features
56+
## Features
57+
58+
- [x] Create a virtual file system
59+
- [x] Create a virtual file or directory
60+
- [ ] ...
61+
62+
### We use the lastest C# features
4063

4164
This library targets .NET 7.0 and uses the latest C# features. It is written in C# 11.0 and uses the new `init`
4265
properties, `record` types, `switch` expressions, `using` declarations, and more.
4366

4467
I invite you to read the [C# 11.0 documentation](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-11) to
4568
learn more about these features.
4669

70+
## Installation
71+
72+
### NuGet
73+
74+
VirtualFileSystem is available on [NuGet](https://www.nuget.org/packages/VirtualFileSystem/).
75+
76+
You can install it using the .NET Core CLI:
77+
78+
```bash
79+
dotnet add package Atypical.VirtualFileSystem
80+
```
81+
82+
or by adding a package reference to your project file:
83+
84+
```xml
85+
<PackageReference Include="Atypical.VirtualFileSystem" Version="0.1.1" />
86+
```
87+
88+
### Source
89+
90+
You can also clone the repository and build the project yourself.
91+
92+
```bash
93+
git clone
94+
cd VirtualFileSystem
95+
dotnet build
96+
```
97+
98+
## Usage
99+
100+
### Creating a virtual file system, add some files and print the content of the root directory as an ASCII tree
101+
102+
```csharp
103+
IVirtualFileSystem vfs = new VFS()
104+
.CreateFile("dir1/file1.txt")
105+
.CreateFile("dir1/file2.txt")
106+
.CreateFile("dir1/file3.txt")
107+
.CreateFile("dir2/file1.txt")
108+
.CreateFile("dir2/file2.txt")
109+
.CreateFile("dir2/file3.txt")
110+
.CreateFile("dir3/file1.txt")
111+
.CreateFile("dir3/file2.txt")
112+
.CreateFile("dir3/file3.txt");
113+
114+
string tree = vfs.ToString();
115+
116+
// sample output (the order of the files is alphabetical)
117+
string expected = """
118+
vfs://
119+
├── superheroes
120+
│ ├── batman.txt
121+
│ ├── superman.txt
122+
│ └── wonderwoman.txt
123+
├── villains
124+
│ ├── joker.txt
125+
│ ├── lexluthor.txt
126+
│ └── penguin.txt
127+
└── world
128+
├── gotham.txt
129+
├── metropolis.txt
130+
└── themyscira.txt
131+
""";
132+
```
133+
134+
## Documentation
135+
136+
The documentation is still a work in progress.
137+
138+
One goal of **Virtual File System** is to provide a complete documentation of the library on **GitHub Pages**. For now,
139+
you can read the XML documentation generated on build.
140+
141+
All summaries are written in English. If you want to help us translate the documentation, please open an issue to
142+
discuss it.
143+
144+
## Contributing
145+
146+
Contributions are welcome! Please read the [contribution guidelines](CONTRIBUTING.md) first.
147+
47148
## License
48149

49150
This project is licensed under the terms of the BSD-3-Clause license.
50151
If you use this library in your project, please consider adding a link to this repository in your project's README.
51152

52153
This project is maintained by [Atypical Consulting](https://www.atypical.consulting/). If you need help with this
53154
project, please contact us from this repository by opening an issue.
155+
156+
## Contact
157+
158+
You can contact us by opening an issue on this repository.
159+
160+
## Acknowledgements
161+
162+
* [All Contributors](../../contributors)
163+
* [Atypical Consulting](https://www.atypical.consulting/)
164+
165+
## Changelog
166+
167+
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
168+
169+
## Contributors
170+
171+
[![Contributors](https://contrib.rocks/image?repo=Atypical-Consulting/VirtualFileSystem)](http://contrib.rocks)

0 commit comments

Comments
 (0)