Crystal Space
Welcome, Guest. Please login or register.
August 31, 2014, 03:34:26 am

Login with username, password and session length
Search:     Advanced search
9009 Posts in 2043 Topics by 8365 Members
Latest Member: Flypatty20
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  General Crystal Space Discussion
| | |-+  VFS SUCKS!!!
« previous next »
Pages: [1] Print
Author Topic: VFS SUCKS!!!  (Read 3455 times)
Recon
Newbie
*
Posts: 24


View Profile
« on: August 09, 2006, 04:23:23 am »

Just want to say that i am sick of seeing
"Segment Fault"  and tring to make sence of how to use VFS

Regards








Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: August 09, 2006, 07:32:35 am »

Just want to say that i am sick of seeing
"Segment Fault"  and tring to make sence of how to use VFS

Regards







Can you be more specific about your problem? Did you try to debug in a debugger where it is crashing? What is the code you are using that is not working?

Greetings,


Logged
Recon
Newbie
*
Posts: 24


View Profile
« Reply #2 on: August 30, 2006, 03:18:02 pm »

Just want to make this a more positave post.

My problem with VFS was it's like a black hole. In that stuff goes in but never comes out.
As it's the first thing any beginner is going to have to deal with I found the doc's lacked some simple example code to help. Spend a long time looking at segment faults not knowing if the VFS had mounted my files or not. Alter a long time i looking I found a list function in viewtest. As soon as i could see directly what was in VFS things got so much easer.


 // Print out dirs list
   printf ("Dirs\n");
   csRef<iStringArray> dirs = VFS->GetMounts ();
   for (i=0; i < dirs->GetSize(); i++)   
   printf ("%s \n", dirs->Get(i));   
   printf ("\n");

   VFS->ChDir ("/solworld/factories");
  // Print out dir-contents
   printf ("Files\n");
   csRef<iStringArray> files = VFS->FindFiles ("*");
   for (i=0; i < files->GetSize(); i++)   
       printf ("%s \n", files->Get(i));   
   printf ("\n");

this little piece of code did more for me that all the doc's on the VFS system.

Regards, VFS works it just hard to tell when it's working and what is in it.
Logged
Recon
Newbie
*
Posts: 24


View Profile
« Reply #3 on: October 24, 2006, 05:18:05 pm »

learned two new things about VFS today

one
     you can use the  vfh[exe] program from cs to browes you VFS setup, copy it to your application directory and run it.

two
    when using
                // Load application-specific configuration file.
              if (!csInitializer::SetupConfigManager(r,
                                "/this/vfs.cfg", GetApplicationName()) )

the file must be called "vfs.cfg" or any mount commands in the cfg file will not work !!!!

regards

Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 6.205 seconds with 16 queries.