예제 #1
0
        public override int ioGetstat(string fileName, SceIoStat stat)
        {
            StringBuilder restFileName = new StringBuilder();
            string        umdFileName  = getUmdFileName(fileName, restFileName);

            if (!string.ReferenceEquals(umdFileName, null) && isVirtualFile(restFileName.ToString()))
            {
                return(umdIoGetstat(umdFileName, restFileName.ToString(), stat));
            }

            return(vfs.ioGetstat(fileName, stat));
        }
예제 #2
0
        private int umdIoGetstat(string umdFileName, string restFileName, SceIoStat stat)
        {
            StringBuilder      localFileName = new StringBuilder();
            IVirtualFileSystem vfs           = getUmdVfs(umdFileName, localFileName);

            if (vfs != null)
            {
                int result = vfs.ioGetstat(localFileName.ToString(), stat);
                // If the UMD file is actually a directory
                // (e.g. containing the EBOOT.PBP),
                // then stat the real file (EBOOT.PBP or DOCUMENT.DAT).
                if (!string.ReferenceEquals(restFileName, null) && restFileName.Length > 0 && result == 0)
                {
                    if ((stat.attr & 0x10) != 0)
                    {
                        result = vfs.ioGetstat(localFileName.ToString() + "/" + restFileName, stat);
                    }
                }
                return(result);
            }

            return(IO_ERROR);
        }
예제 #3
0
 public virtual int ioGetstat(string fileName, SceIoStat stat)
 {
     return(vfs.ioGetstat(fileName, stat));
 }