Esempio n. 1
0
        public unsafe int IoDread(HleIoDrvFileArg HleIoDrvFileArg, HleIoDirent* IoDirent)
        {
            var Enumerator = (DirectoryEnumerator<IsoNode>)HleIoDrvFileArg.FileArgument;

            // More items.
            if (Enumerator.MoveNext())
            {
                //Console.Error.WriteLine("'{0}'", Enumerator.Current.ToString());
                var IsoNode = Enumerator.Current;
                {
                    PointerUtils.StoreStringOnPtr(IsoNode.Name, Encoding.UTF8, IoDirent->Name);
                    _IoGetstat(IsoNode, &IoDirent->Stat);
                }
            }
            // No more items.
            else
            {
            }

            return Enumerator.GetLeft();
        }
Esempio n. 2
0
        public unsafe int IoDread(HleIoDrvFileArg HleIoDrvFileArg, HleIoDirent* IoDirent)
        {
            //var Enumerator = (DirectoryEnumerator<IsoNode>)(DisposableDummy<DirectoryEnumerator<IsoNode>>)HleIoDrvFileArg.FileArgument;
            var Enumerator = (DirectoryEnumerator<IsoNode>)HleIoDrvFileArg.FileArgument;

            // More items.
            if (Enumerator.MoveNext())
            {
                //Console.Error.WriteLine("'{0}'", Enumerator.Current.ToString());
                var IsoNode = Enumerator.Current;
                {
                    IoDirent->Name = IsoNode.Name;
                    _IoGetstat(IsoNode, &IoDirent->Stat);
                }
            }
            // No more items.
            else
            {
            }

            return Enumerator.GetLeft();
        }
        public unsafe int IoDread(HleIoDrvFileArg HleIoDrvFileArg, HleIoDirent* IoDirent)
        {
            //var Enumerator = (DirectoryEnumerator<HleIoDirent>)(DisposableDummy<DirectoryEnumerator<HleIoDirent>>)HleIoDrvFileArg.FileArgument;
            var Enumerator = (DirectoryEnumerator<HleIoDirent>)HleIoDrvFileArg.FileArgument;

            // More items.
            if (Enumerator.MoveNext())
            {
                //Console.Error.WriteLine("'{0}'", Enumerator.Current.ToString());
                *IoDirent = Enumerator.Current;
                /*

                */
            }
            // No more items.
            else
            {
            }

            return Enumerator.GetLeft();
        }
Esempio n. 4
0
 public unsafe int IoDread(HleIoDrvFileArg HleIoDrvFileArg, HleIoDirent* dir)
 {
     throw new NotImplementedException();
 }
        public unsafe int IoDread(HleIoDrvFileArg HleIoDrvFileArg, HleIoDirent* IoDirent)
        {
            var Enumerator = (DirectoryEnumerator<FileSystemInfo>)HleIoDrvFileArg.FileArgument;

            // More items.
            if (Enumerator.MoveNext())
            {
                //Console.Error.WriteLine("'{0}'", Enumerator.Current.ToString());
                var FileSystemInfo = Enumerator.Current;
                var FileInfo = (FileSystemInfo as FileInfo);
                var DirectoryInfo = (FileSystemInfo as DirectoryInfo);
                {
                    PointerUtils.StoreStringOnPtr(FileSystemInfo.Name, Encoding.UTF8, IoDirent->Name);
                    IoDirent->Stat.Size = (FileInfo != null) ? FileInfo.Length : 0;
                    //IoDirent->Stat.Mode = SceMode

                    if (DirectoryInfo != null)
                    {
                        IoDirent->Stat.Mode = SceMode.Directory | (SceMode)0777;
                        IoDirent->Stat.Attributes = IOFileModes.Directory;
                    }
                    else
                    {
                        IoDirent->Stat.Mode = SceMode.File | (SceMode)0777;
                        IoDirent->Stat.Attributes = IOFileModes.File | IOFileModes.CanRead | IOFileModes.CanWrite | IOFileModes.CanExecute;
                    }

                    IoDirent->Stat.DeviceDependentData0 = 10;
                }
            }
            // No more items.
            else
            {
            }

            return Enumerator.GetLeft();
        }
Esempio n. 6
0
 public virtual int IoDread(HleIoDrvFileArg HleIoDrvFileArg, HleIoDirent* dir)
 {
     return ParentDriver.IoDread(HleIoDrvFileArg, dir);
 }