[haiku-development] Re: Using the Flatten() function
- From: Stephan Assmus <superstippi@xxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Fri, 31 Jul 2009 16:39:11 +0200
Hi,
On 2009-07-31 at 16:28:17 [+0200], Yashasvi A.C. <yashasviac@xxxxxxxxx>
wrote:
> On Thu, Jul 30, 2009 at 2:07 AM, Axel Dörfler
> <axeld@xxxxxxxxxxxxxxxx>wrote:
> > "Yashasvi A.C." <yashasviac@xxxxxxxxx> wrote:
> > > file = BFile("..\", "..\MessageStore\", B_READ_WRITE);
> >
> > Flattening writes into the BDataIO (it's a stream), it doesn't generate
> > new files in a folder. You need to open the files you want to flatten
> > the BMessage into directly.
> >
> So, you mean I open a file in a read-write format and then use the
> flatten function. How does the flatten() know which file it needs to
> stream the data to?
Because you pass it the file object of course:
BFile stream("path/to/file", B_CREATE_FILE | B_ERASE_FILE | B_WRITE_ONLY);
message.Flatten(&stream);
Best regards,
-Stephan
- Follow-Ups:
- [haiku-development] A Quick Question
- From: Christopher Dobbs
- [haiku-development] A Quick Question
- References:
- [haiku-development] Using the Flatten() function
- From: Yashasvi A.C.
- [haiku-development] Re: Using the Flatten() function
- From: Axel Dörfler
- [haiku-development] Re: Using the Flatten() function
- From: Yashasvi A.C.
- [haiku-development] Using the Flatten() function
Other related posts:
- » [haiku-development] Using the Flatten() function - Yashasvi A.C.
- » [haiku-development] Re: Using the Flatten() function - Stephan Assmus
- » [haiku-development] Re: Using the Flatten() function - PulkoMandy
- » [haiku-development] Re: Using the Flatten() function - Jonas Sundström
- » [haiku-development] Re: Using the Flatten() function - Axel Dörfler
- » [haiku-development] Re: Using the Flatten() function - Yashasvi A.C.
- » [haiku-development] Re: Using the Flatten() function - Rene Gollent
- » [haiku-development] Re: Using the Flatten() function - Jérôme Duval
- » [haiku-development] Re: Using the Flatten() function - Stephan Assmus
- » [haiku-development] Re: Using the Flatten() function - Yashasvi A.C.
- » [haiku-development] Re: Using the Flatten() function - pete . goodeve