public FatDirectory(FatFileSystem aFileSystem, string aName, ulong firstCluster, Directory baseDirectory, ulong size) : base(aFileSystem, aName, baseDirectory) { FileSystem = aFileSystem; FirstClusterNum = firstCluster; Size = size; }
public override List <Base> GetDirectoryListing(Directory baseDirectory) { if (baseDirectory == null) { baseDirectory = GetRootDirectory(null); } using (var xStream = new FatDirectoryStream((FatDirectory)baseDirectory)) //using(var xStream = new TestFatDirectoryStream((FatDirectory)baseDirectory)) { return(GetDirectoryContents((FatDirectory)baseDirectory, xStream)); } }
private Directory DoGetDirectory(string aPath, Cosmos.System.FileSystem.FileSystem aFS) { if (aFS == null) { throw new Exception("File system can not be null."); } FatHelpers.Debug("In SentinelVFS.DoGetDirectory"); FatHelpers.Debug("Path = " + aPath); string[] xPathParts = VFSManager.SplitPath(aPath); if (xPathParts.Length == 1) { return(GetVolume(aFS, aPath)); } Directory xBaseDirectory = null; // start at index 1, because 0 is the volume for (int i = 1; i < xPathParts.Length; i++) { var xPathPart = xPathParts[i]; var xPartFound = false; var xListing = aFS.GetDirectoryListing(xBaseDirectory); for (int j = 0; j < xListing.Count; j++) { var xListingItem = xListing[j]; if (String.Equals(xListingItem.Name, xPathPart, StringComparison.OrdinalIgnoreCase)) { if (xListingItem is Directory) { xBaseDirectory = (Directory)xListingItem; xPartFound = true; } else { throw new Exception("Path part '" + xPathPart + "' found, but not a directory!"); } } } if (!xPartFound) { throw new Exception("Path part '" + xPathPart + "' not found!"); } } return(xBaseDirectory); }
public override List<Base> GetDirectoryListing(Directory baseDirectory) { if (baseDirectory == null) { baseDirectory = GetRootDirectory(null); } using (var xStream = new FatDirectoryStream((FatDirectory)baseDirectory)) //using(var xStream = new TestFatDirectoryStream((FatDirectory)baseDirectory)) { return GetDirectoryContents((FatDirectory) baseDirectory, xStream); } }
public Directory(FileSystem aFileSystem, string aName, Directory baseDirectory) : base(aFileSystem, aName, baseDirectory) { }
public override List <Base> GetDirectoryListing(Directory aParentDirectory) { throw new NotImplementedException(); }
public abstract List<Base> GetDirectoryListing(Directory aEntry);