Beispiel #1
0
        public unsafe static string[] GetCDROMDrives()
        {
            byte **p;           // CDROM list from PhysFS dll

            string[] cdromlist; // List converted to an array

            // Get the CDROM drive listing
            p = PhysFS_DLL.PHYSFS_getCdRomDirs();
            // Convert the C-style array to a .NET style array
            cdromlist = PhysFS_DLL.BytePPToArray(p);
            // Free the original list since we're done with it
            PhysFS_DLL.PHYSFS_freeList(p);

            return(cdromlist);
        }
Beispiel #2
0
        public unsafe static string[] EnumerateFiles(string Dirname)
        {
            byte **p;           // File list from PhysFS dll

            string[] filelist;  // List converted to an array

            // Get the CDROM drive listing
            p = PhysFS_DLL.PHYSFS_enumerateFiles(Dirname);
            // Convert the C-style array to a .NET style array
            filelist = PhysFS_DLL.BytePPToArray(p);
            // Free the original list since we're done with it
            PhysFS_DLL.PHYSFS_freeList(p);

            return(filelist);
        }
Beispiel #3
0
        public unsafe static string[] GetSearchPath()
        {
            byte **p;           // Searchpath list from PhysFS dll

            string[] pathlist;  // List converted to an array

            // Get the CDROM drive listing
            p = PhysFS_DLL.PHYSFS_getSearchPath();
            // Convert the C-style array to a .NET style array
            pathlist = PhysFS_DLL.BytePPToArray(p);
            // Free the original list since we're done with it
            PhysFS_DLL.PHYSFS_freeList(p);

            return(pathlist);
        }