1
// Copyright (C) 2002-2011 Nikolaus Gebhardt
2
// This file is part of the "Irrlicht Engine".
3
// For conditions of distribution and use, see copyright notice in irrlicht.h
5
#ifndef __C_WRITE_FILE_H_INCLUDED__
6
#define __C_WRITE_FILE_H_INCLUDED__
9
#include "IWriteFile.h"
10
#include "irrString.h"
19
Class for writing a real file to disk.
21
class CWriteFile : public IWriteFile
25
CWriteFile(const io::path& fileName, bool append);
27
virtual ~CWriteFile();
29
//! Reads an amount of bytes from the file.
30
virtual s32 write(const void* buffer, u32 sizeToWrite);
32
//! Changes position in file, returns true if successful.
33
virtual bool seek(long finalPos, bool relativeMovement = false);
35
//! Returns the current position in the file.
36
virtual long getPos() const;
38
//! Returns name of file.
39
virtual const io::path& getFileName() const;
41
//! returns if file is open
47
void openFile(bool append);
55
} // end namespace irr