VFSPathExtensions.GetAncestors(thisVFSPath).md
January 20, 2026 ยท View on GitHub
Atypical.VirtualFileSystem.Core
Atypical.VirtualFileSystem.Core.Extensions.VFSPathExtensions
VFSPathExtensions.GetAncestors(this VFSPath) Method
Gets all ancestor paths from the current path up to the root.
public static System.Collections.Generic.IEnumerable<Atypical.VirtualFileSystem.Core.VFSDirectoryPath> GetAncestors(this Atypical.VirtualFileSystem.Core.VFSPath path);
Parameters
path VFSPath
The VFS path.
Returns
System.Collections.Generic.IEnumerable<VFSDirectoryPath>
Collection of ancestor paths from immediate parent to root.