public override string[] ioDopen(string dirName) { string[] entries = null; StringBuilder restFileName = new StringBuilder(); string umdFileName = getUmdFileName(dirName, restFileName); if (!string.ReferenceEquals(umdFileName, null) && restFileName.Length == 0) { entries = new string[] { EBOOT_PBP }; } else if (PSP_GAME.Equals(dirName)) { for (int i = 0; i < umdPaths.Length; i++) { File umdPath = umdPaths[i]; if (umdPath.Directory) { File[] umdFiles = umdPath.listFiles(new UmdBrowser.UmdFileFilter()); entries = merge(entries, addUmdFileNames(dirName, umdFiles)); } } entries = merge(entries, vfs.ioDopen(dirName)); } else { entries = vfs.ioDopen(dirName); } return(entries); }
private void scan(string dirName, FatFileInfo parent) { string[] names = vfs.ioDopen(dirName); if (names == null || names.Length == 0) { return; } SceIoStat stat = new SceIoStat(); SceIoDirent dir = new SceIoDirent(stat, null); for (int i = 0; i < names.Length; i++) { dir.filename = names[i]; if (vfs.ioDread(dirName, dir) >= 0) { bool directory = (dir.stat.attr & 0x10) != 0; bool readOnly = (dir.stat.mode & 0x2) == 0; FatFileInfo fileInfo = new FatFileInfo(vFile.DeviceName, dirName, dir.filename, directory, readOnly, dir.stat.mtime, dir.stat.size); parent.addChild(fileInfo); if (directory) { if (string.ReferenceEquals(dirName, null)) { scan(dir.filename, fileInfo); } else { scan(dirName + "/" + dir.filename, fileInfo); } } // Allocate the clusters after having scanned the children allocateClusters(fileInfo); } } IList <FatFileInfo> children = parent.Children; if (children != null) { foreach (FatFileInfo child in children) { computeFileName83(child, children); } } }
public virtual string[] ioDopen(string dirName) { return(vfs.ioDopen(dirName)); }