[haiku-development] Re: Using the Flatten() function

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 29 Jul 2009 15:51:22 +0200

Hi,

On 2009-07-29 at 15:36:08 [+0200], Yashasvi A.C. <yashasviac@xxxxxxxxx> 
wrote:
> I have written something like:
> ****
> file = BFile("..\", "..\MessageStore\", B_READ_WRITE);
> ****
> 
> I am passing the parent directory as the directory parameter, the 
> MessageFolder as the path and the open mode status.
> 
> Can you help me out with this?

The path stuff looks a bit weird, but if that is correct, you may also have 
to pass B_CREATE_FILE and/or B_ERASE_FILE additionally to B_READ_WRITE as 
flags, if the file does not exist already, respectively if it does exist, 
but needs to be cleared.

> P.S.: Is there any place where I can check how different functions listed 
> in the BeBook can be implemented? Something like en example or a tutorial 
> page somewhere?

That depends. There is a lot of sample code around, like for example in the 
Developer Tools on BeBits or HaikuWare. Most Haiku code is also good to 
learn from. Though it doesn't tell you before what all it contains.

Best regards,
-Stephan

Other related posts: