-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Atypical-Consulting/features-linting
Add .editorconfig and lint the code
- Loading branch information
Showing
27 changed files
with
2,930 additions
and
2,966 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 48 additions & 48 deletions
96
src/Atypical.VirtualFileSystem.Core/Abstractions/VFSNode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
// Copyright (c) 2022, Atypical Consulting SRL | ||
// All rights reserved. | ||
// | ||
// This source code is licensed under the BSD-style license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
namespace Atypical.VirtualFileSystem.Core.Abstractions; | ||
|
||
/// <summary> | ||
/// Represents a node in a virtual file system. | ||
/// A node can be a file or a directory. | ||
/// </summary> | ||
public abstract record VFSNode | ||
: IVirtualFileSystemNode | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="VFSNode"/> class. | ||
/// This constructor is used by derived classes. | ||
/// </summary> | ||
/// <param name="path">The path of the node.</param> | ||
protected VFSNode(VFSPath path) | ||
{ | ||
ArgumentNullException.ThrowIfNull(path); | ||
|
||
// set timestamps | ||
var now = DateTime.UtcNow; | ||
CreationTime = now; | ||
LastAccessTime = now; | ||
LastWriteTime = now; | ||
} | ||
|
||
/// <inheritdoc cref="IVirtualFileSystemNode.CreationTime"/> | ||
public abstract VFSPath Path { get; } | ||
/// <inheritdoc cref="IVirtualFileSystemNode.CreationTime"/> | ||
public DateTimeOffset CreationTime { get; } | ||
/// <inheritdoc cref="IVirtualFileSystemNode.LastAccessTime"/> | ||
public DateTimeOffset LastAccessTime { get; } | ||
|
||
/// <inheritdoc cref="IVirtualFileSystemNode.LastWriteTime"/> | ||
public DateTimeOffset LastWriteTime { get; } | ||
/// <inheritdoc cref="IVirtualFileSystemNode.IsDirectory"/> | ||
public abstract bool IsDirectory { get; } | ||
/// <inheritdoc cref="IVirtualFileSystemNode.IsFile"/> | ||
public abstract bool IsFile { get; } | ||
// Copyright (c) 2022, Atypical Consulting SRL | ||
// All rights reserved. | ||
// | ||
// This source code is licensed under the BSD-style license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
namespace Atypical.VirtualFileSystem.Core.Abstractions; | ||
|
||
/// <summary> | ||
/// Represents a node in a virtual file system. | ||
/// A node can be a file or a directory. | ||
/// </summary> | ||
public abstract record VFSNode | ||
: IVirtualFileSystemNode | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="VFSNode" /> class. | ||
/// This constructor is used by derived classes. | ||
/// </summary> | ||
/// <param name="path">The path of the node.</param> | ||
protected VFSNode(VFSPath path) | ||
{ | ||
ArgumentNullException.ThrowIfNull(path); | ||
|
||
// set timestamps | ||
var now = DateTime.UtcNow; | ||
CreationTime = now; | ||
LastAccessTime = now; | ||
LastWriteTime = now; | ||
} | ||
|
||
/// <inheritdoc cref="IVirtualFileSystemNode.CreationTime" /> | ||
public abstract VFSPath Path { get; } | ||
|
||
/// <inheritdoc cref="IVirtualFileSystemNode.CreationTime" /> | ||
public DateTimeOffset CreationTime { get; } | ||
|
||
/// <inheritdoc cref="IVirtualFileSystemNode.LastAccessTime" /> | ||
public DateTimeOffset LastAccessTime { get; } | ||
|
||
/// <inheritdoc cref="IVirtualFileSystemNode.LastWriteTime" /> | ||
public DateTimeOffset LastWriteTime { get; } | ||
|
||
/// <inheritdoc cref="IVirtualFileSystemNode.IsDirectory" /> | ||
public abstract bool IsDirectory { get; } | ||
|
||
/// <inheritdoc cref="IVirtualFileSystemNode.IsFile" /> | ||
public abstract bool IsFile { get; } | ||
} |
Oops, something went wrong.