Skip to content

Commit d25d16c

Browse files
authored
Merge pull request #70 from rameel/comment-improvements
Polish comments and fix typos
2 parents 75440d3 + 88c00d4 commit d25d16c

12 files changed

Lines changed: 20 additions & 20 deletions

File tree

src/Ramstack.FileSystem.Abstractions/Utilities/PathTokenizer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public Enumerator GetEnumerator() =>
1717
new Enumerator(path);
1818

1919
/// <summary>
20-
/// Tokenizes the specified path into a collection of the path components.
20+
/// Tokenizes the specified path into a collection of path components.
2121
/// </summary>
2222
/// <param name="path">The file path to tokenize.</param>
2323
/// <returns>

src/Ramstack.FileSystem.Abstractions/VirtualFileSystemExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static ValueTask WriteAsync(this IVirtualFileSystem fs, string path, Stre
9797
fs.GetFile(path).WriteAsync(stream, overwrite, cancellationToken);
9898

9999
/// <summary>
100-
/// Asynchronously reads all the text in the file with the specified encoding.
100+
/// Asynchronously reads all the text in the file.
101101
/// </summary>
102102
/// <param name="fs">The file system to use.</param>
103103
/// <param name="path">The file from which to read the entire text content.</param>
@@ -124,7 +124,7 @@ public static ValueTask<string> ReadAllTextAsync(this IVirtualFileSystem fs, str
124124
fs.GetFile(path).ReadAllTextAsync(encoding, cancellationToken);
125125

126126
/// <summary>
127-
/// Asynchronously reads all lines of the file with the specified encoding.
127+
/// Asynchronously reads all lines of the file.
128128
/// </summary>
129129
/// <param name="fs">The file system to use.</param>
130130
/// <param name="path">The file to read from.</param>

src/Ramstack.FileSystem.Abstractions/VirtualPath.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ public static ReadOnlySpan<char> GetDirectoryName(ReadOnlySpan<char> path)
157157
}
158158

159159
/// <summary>
160-
/// Determines if the specified path in a normalized form.
160+
/// Determines if the specified path is in a normalized form.
161161
/// </summary>
162162
/// <param name="path">The path to test.</param>
163163
/// <returns>
164-
/// <see langword="true" /> if the path in a normalized form;
164+
/// <see langword="true" /> if the path is in a normalized form;
165165
/// otherwise, <see langword="false" />.
166166
/// </returns>
167167
public static bool IsNormalized(ReadOnlySpan<char> path)

src/Ramstack.FileSystem.Amazon/AccessControl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public enum AccessControl
4444
AwsExecRead,
4545

4646
/// <summary>
47-
/// Object Owner gets FULL_CONTROL, Bucket Owner gets READ
47+
/// Object Owner gets FULL_CONTROL, Bucket Owner gets READ.
4848
/// This ACL applies only to objects and is equivalent to private when used with PUT Bucket.
4949
/// You use this ACL to let someone other than the bucket owner write content (get full control)
5050
/// in the bucket but still grant the bucket owner read access to the objects.

src/Ramstack.FileSystem.Amazon/S3Directory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected override async ValueTask DeleteCoreAsync(CancellationToken cancellatio
5454
{
5555
// The maximum number of objects returned is MaxKeys, which is 1000,
5656
// and the maximum number of objects that can be deleted at once is also 1000.
57-
// Therefore, we can rely (sure?) on this and avoid splitting
57+
// Therefore, we can rely on this and avoid splitting
5858
// the retrieved objects into separate batches.
5959

6060
var response = await _fs.AmazonClient

src/Ramstack.FileSystem.Composite/CompositeDirectory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal sealed class CompositeDirectory : VirtualDirectory
1717
/// <summary>
1818
/// Initializes a new instance of the <see cref="CompositeDirectory"/> class.
1919
/// </summary>
20-
/// <param name="fileSystem">The file system associated with this file.</param>
20+
/// <param name="fileSystem">The file system associated with this directory.</param>
2121
/// <param name="path">The path of the directory.</param>
2222
public CompositeDirectory(CompositeFileSystem fileSystem, string path) : base(path) =>
2323
_fs = fileSystem;

src/Ramstack.FileSystem.Composite/CompositeFileSystem.Helpers.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ namespace Ramstack.FileSystem.Composite;
55
partial class CompositeFileSystem
66
{
77
/// <summary>
8-
/// Tries to flatten the specified <see cref="IVirtualFileSystem"/> into a flat list of the <see cref="IVirtualFileSystem"/>.
8+
/// Tries to flatten the specified <see cref="IVirtualFileSystem"/> into a flat list of <see cref="IVirtualFileSystem"/> instances.
99
/// </summary>
1010
/// <remarks>
1111
/// If the <paramref name="fileSystem"/> is not a <see cref="CompositeFileSystem"/>,
1212
/// the same instance of the <paramref name="fileSystem"/> is returned.
1313
/// </remarks>
1414
/// <param name="fileSystem">The <see cref="IVirtualFileSystem"/> to flatten.</param>
1515
/// <returns>
16-
/// A <see cref="IVirtualFileSystem"/> that represents the flattened version of the specified <see cref="IVirtualFileSystem"/>.
16+
/// An <see cref="IVirtualFileSystem"/> that represents the flattened version of the specified <see cref="IVirtualFileSystem"/>.
1717
/// </returns>
1818
public static IVirtualFileSystem Flatten(IVirtualFileSystem fileSystem)
1919
{
@@ -26,29 +26,29 @@ public static IVirtualFileSystem Flatten(IVirtualFileSystem fileSystem)
2626
}
2727

2828
/// <summary>
29-
/// Creates an instance of the <see cref="IVirtualFileSystem"/> from the specified list and flattens it into a flat list of file systems.
29+
/// Creates an <see cref="IVirtualFileSystem"/> from the specified list, flattening any nested <see cref="CompositeFileSystem"/> instances.
3030
/// </summary>
3131
/// <remarks>
3232
/// This method returns a <see cref="CompositeFileSystem"/> if more than one file system remains after flattening.
3333
/// </remarks>
3434
/// <param name="list">The list of <see cref="IVirtualFileSystem"/> instances to compose and flatten.</param>
3535
/// <returns>
36-
/// A <see cref="IVirtualFileSystem"/> that represents the flattened version of the specified list of the <see cref="IVirtualFileSystem"/>.
36+
/// An <see cref="IVirtualFileSystem"/> that represents the flattened version of the specified list of <see cref="IVirtualFileSystem"/> instances.
3737
/// </returns>
3838
public static IVirtualFileSystem Create(params IVirtualFileSystem[] list) =>
3939
list.Length != 1
4040
? Create(list.AsEnumerable())
4141
: Flatten(list[0]);
4242

4343
/// <summary>
44-
/// Creates an instance of the <see cref="IVirtualFileSystem"/> from the specified list and flattens it into a flat list of file systems.
44+
/// Creates an <see cref="IVirtualFileSystem"/> from the specified list, flattening any nested <see cref="CompositeFileSystem"/> instances.
4545
/// </summary>
4646
/// <remarks>
4747
/// This method returns a <see cref="CompositeFileSystem"/> if more than one file system remains after flattening.
4848
/// </remarks>
4949
/// <param name="list">The list of <see cref="IVirtualFileSystem"/> instances to compose and flatten.</param>
5050
/// <returns>
51-
/// A <see cref="IVirtualFileSystem"/> that represents the flattened version of the specified list of the <see cref="IVirtualFileSystem"/>.
51+
/// An <see cref="IVirtualFileSystem"/> that represents the flattened version of the specified list of <see cref="IVirtualFileSystem"/> instances.
5252
/// </returns>
5353
public static IVirtualFileSystem Create(IEnumerable<IVirtualFileSystem> list)
5454
{

src/Ramstack.FileSystem.Globbing/Internal/PathHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ internal static class PathHelper
1818
/// <summary>
1919
/// Determines whether the specified path matches any of the specified patterns.
2020
/// </summary>
21-
/// <param name="path">The path to match for a match.</param>
21+
/// <param name="path">The path to test for a match.</param>
2222
/// <param name="patterns">An array of patterns to match against the path.</param>
2323
/// <returns>
2424
/// <see langword="true" /> if the path matches any of the patterns;

src/Ramstack.FileSystem.Physical/PhysicalDirectory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected override ValueTask DeleteCoreAsync(CancellationToken cancellationToken
6868
}
6969
catch (DirectoryNotFoundException)
7070
{
71-
// The path to the deleting directory may not exist.
71+
// The path of the directory being deleted may not exist.
7272
// This is a safe scenario and does not require further handling.
7373
}
7474

src/Ramstack.FileSystem.Physical/PhysicalFile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ internal PhysicalFile(PhysicalFileSystem fileSystem, string path, string physica
4343
/// <inheritdoc />
4444
protected override ValueTask<Stream> OpenReadCoreAsync(CancellationToken cancellationToken)
4545
{
46-
// SequentialScan is a performance hint that requires extra sys-call on non-Windows systems.
46+
// SequentialScan is a performance hint that requires an extra system call on non-Windows systems.
4747
// https://github.com/dotnet/runtime/blob/46c9a4fff83f35ec659e6659050440aadccf3201/src/libraries/System.Private.CoreLib/src/System/IO/File.cs#L694
4848
var options = OperatingSystem.IsWindows()
4949
? FileOptions.Asynchronous | FileOptions.SequentialScan
@@ -119,7 +119,7 @@ protected override ValueTask DeleteCoreAsync(CancellationToken cancellationToken
119119
}
120120
catch (DirectoryNotFoundException)
121121
{
122-
// The path to the deleting file may not exist.
122+
// The path of the file being deleted may not exist.
123123
// This is a safe scenario and does not require further handling.
124124
}
125125

0 commit comments

Comments
 (0)