1//----------------------------------------------------------------------
2//  This software is part of the OpenBeOS distribution and is covered
3//  by the OpenBeOS license.
4//
5//  Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
6//----------------------------------------------------------------------
7
8/*! \file FileStream.h
9*/
10
11#ifndef _FILE_STREAM_H
12#define _FILE_STREAM_H
13
14#include <File.h>
15
16#include "PositionIOStream.h"
17
18/*! \brief 	DataStream implementation that writes directly to a file.
19*/
20class FileStream : public PositionIOStream {
21public:
22	FileStream(const char *path, uint32 open_mode);
23	virtual status_t InitCheck() const;
24	void Flush() { fFile.Sync(); }
25
26private:
27	BFile fFile;
28};
29
30#endif	// _FILE_STREAM_H
31