BDirectory dir("/boot"); entry_ref ref; while(dir.GetNextRef(&ref) == B_OK) { printf("%s\n", ref.name); }
BDirectory dir("/boot"); dir.CreateDirectory("new_directory");This code creates a new directory named "new_directory" inside the /boot directory by obtaining a reference to the /boot directory with the BDirectory constructor and then calling the CreateDirectory() method with the new directory's name. Package library: BeOS API (libbe.so)