Skip to content

Commit

Permalink
Doc comments and remove unneeded public surface area
Browse files Browse the repository at this point in the history
  • Loading branch information
erikmav committed Feb 5, 2024
1 parent dfa8e80 commit 6fcde4d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Lib/ProjFsVirtualizationSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

namespace WinVfs.VirtualFilesystem;

/// <summary>
/// Creates and manages a ProjFS virtual filesystem session.
/// </summary>
public sealed class ProjFsVirtualizationSession : IDisposable
{
const long DirectorySize = -1; // File size used for directory placeholders
Expand Down Expand Up @@ -44,7 +47,7 @@ public sealed class ProjFsVirtualizationSession : IDisposable
private readonly ProjFsCallbackHandler _projFsCallbackHandler;

/// <summary>
/// Constructs and starts a projFS virtualization session centered on a directory.
/// Constructs and starts a ProjFS virtualization session centered on a directory.
/// </summary>
/// <param name="virtualizationRootDir">The full path to the root directory.</param>
/// <param name="callbacks">Callbacks required to answer virtualization queries.</param>
Expand Down Expand Up @@ -163,6 +166,10 @@ public void Dispose()
_projFsCallbackHandler.Dispose();
}

/// <summary>
/// Gets the current statistics for this instance. The object is not cloned as a snapshot,
/// meaning the stats will continue to be updated.
/// </summary>
public ProjFsStats Stats { get; } = new();

/// <summary>
Expand Down Expand Up @@ -231,7 +238,7 @@ internal void CreatePlaceholder(string virtualRelativeDirPath, IFileSystemEntry
}
}

public void CreateFilePlaceholder(string virtualRelativePath, IFileSystemEntry entry)
private void CreateFilePlaceholder(string virtualRelativePath, IFileSystemEntry entry)
{
#if DEBUG
if (entry.IsDirectory)
Expand All @@ -243,7 +250,7 @@ public void CreateFilePlaceholder(string virtualRelativePath, IFileSystemEntry e
CreatePlaceholder(virtualRelativePath, entry, FileAttr, entry.FileSize);
}

public void CreateDirPlaceholder(string virtualRelativePath, IFileSystemEntry entry)
private void CreateDirPlaceholder(string virtualRelativePath, IFileSystemEntry entry)
{
#if DEBUG
if (!entry.IsDirectory)
Expand Down Expand Up @@ -310,7 +317,7 @@ private static HResult CreatePlaceholder(VirtualizationInstance projFs, string v
/// <summary>
/// Creates a ProjFS placeholder (reparse point) in the filesystem within an existing directory.
/// </summary>
public void CreatePlaceholder(string virtualRelativeEntryPath, IFileSystemEntry entry, FileAttributes attributes, long endOfFile)
private void CreatePlaceholder(string virtualRelativeEntryPath, IFileSystemEntry entry, FileAttributes attributes, long endOfFile)
=> CreatePlaceholder(_projFs, virtualRelativeEntryPath, entry, _sessionStartTimeUtc, attributes, endOfFile, _logger);

/// <summary>
Expand All @@ -320,7 +327,7 @@ public void CreatePlaceholder(string virtualRelativeEntryPath, IFileSystemEntry
/// them before starting virtualization, then calling this method to activate them within the VFS.
/// </summary>
/// <param name="virtualRelativePath">The directory path relative to the virtual root.</param>
public void MarkRealDirectoryAsMaterializedPlaceholder(string virtualRelativePath)
internal void MarkRealDirectoryAsMaterializedPlaceholder(string virtualRelativePath)
{
if (virtualRelativePath.Length == 0)
{
Expand Down
3 changes: 3 additions & 0 deletions Lib/VirtualFilesystemException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace WinVfs.VirtualFilesystem;

/// <summary>
/// The exception used when a fatal exception was encountered.
/// </summary>
public sealed class VirtualFilesystemException : Exception
{
public VirtualFilesystemException()
Expand Down

0 comments on commit 6fcde4d

Please sign in to comment.