private void checkParamSFO(byte[] input) { SFOReader sfoReader = new SFOReader(input); Package_APP_VER = sfoReader.APP_VER; Package_CONTENT_ID = sfoReader.CONTENT_ID; Package_PSP2_DISP_VER = sfoReader.PSP2_DISP_VER; Package_PSP2_SYSTEM_VER = sfoReader.PSP2_SYSTEM_VER; Package_STITLE = sfoReader.STITLE; Package_TITLE = sfoReader.TITLE; Package_TITLE_ID = sfoReader.TITLE_ID; Package_VERSION = sfoReader.VERSION; }
protected override string GetInfo(RequestedInfoType infoType, bool singleLine) { switch (infoType) { case RequestedInfoType.InfoTip: if (File.Exists(Path.Combine(SelectedItemPath, @"sce_sys\param.sfo")) && File.Exists(Path.Combine(SelectedItemPath, @"sce_sys\icon0.png"))) { try { byte[] sfodata = File.ReadAllBytes(Path.Combine(SelectedItemPath, @"sce_sys\param.sfo")); SFOReader sfoReader = new SFOReader(sfodata); string result = string.Format("PSVita Game Folder\nTITLE:{0}\nTITLE_ID:{1}\nCONTENT_ID:{2}\nPSP2_DISP_VER:{3}\nVERSION:{4}", sfoReader.TITLE, sfoReader.TITLE_ID, sfoReader.CONTENT_ID, sfoReader.PSP2_DISP_VER, sfoReader.VERSION); sfodata = null; GC.Collect(); return(result); } catch { Logger.Error("SFO Reading Error", string.Format("Error occured in reading {0}", Path.Combine(SelectedItemPath, @"sce_sys\param.sfo"))); return(string.Empty); } } DirectoryInfo info = new DirectoryInfo(SelectedItemPath); return(string.Format("{0}\n{1}", Path.GetFileName(SelectedItemPath), Directory.GetCreationTime(SelectedItemPath))); case RequestedInfoType.Name: return(string.Format("Folder '{0}'", Path.GetFileName(SelectedItemPath))); default: return(string.Empty); } }