Toggle navigation
Beam GIT List
GitHub
Repo
Changelog
To do
Releases
Themes
Change log
Loading change log ...
To do ...
Loading todo ...
browsing:
e18d75e8aa9405e8af88e159bd26f678f3dbdc39
Branches
master
Tags
tms/release-pre-2.1.0
tms/release-2.2.1
tms/release-2.2.0
tms/release-2.1.0
tms/release-2.0.6
tms/release-2.0.5
tms/release-2.0.4
tms/release-2.0.3first
tms/release-2.0.3
tms/release-1.2.12
tms/release-1.2.11
tms/release-1.2.10
tms/release-1.2.9
tms/release-1.2.8
tms/release-1.2.6a
tms/release-1.2.6
tms/release-1.2.4
tms/release-1.2.3
tms/release-1.2.2
tms/release-1.2.0
tms/release-1.1.2
tms/release-1.1.1
tms/release-1.0.2
tms/release-1.0.1
tms/release-1.0.0
tms/release-0.4.3
tms/release-0.4.2
tms/release-0.4.1
tms/release-0.3.14
tms/release-0.3.13
tms/release-0.3.12
tms/release-0.3.10
tms/release-0.3.9
tms/release-0.3.8
tms/release-0.3.5
tms/release-0.3.4
tms/release-0.3.3
tms/release-0.2.7
tms/release-0.2.5
tms/release-0.2.3
tms-mcsys/release-2.1.0-1.beam
tms-mcsys/release-2.0.6-1.beam
tms-mcsys/release-1.2.9-1.beam
tms-fpga/release-1.2.5
tms-fpga/release-1.2.4
Files
Commits
Log
Graph
Stats
tms-old
beam
libBeam
BFile.h
RSS
Git
Fetch origin
Download
ZIP
TAR
Clone
Raw
View
History
Clone
HTTPS
Blames found: 17
Mode: text/x-c++src
Binary: false
Hang on, we reloading big blames...
6ae0d525
/******************************************************************************* * BFile.h BEAM BFile access class * T.Barnaby, BEAM Ltd, 27/11/95
57456599
* Copyright (c) 2012 All Right Reserved, Beam Ltd, http://www.beam.ltd.uk
6ae0d525
******************************************************************************* */ #ifndef BFILE_H #define BFILE_H 1 #include <stdio.h>
57456599
#include <BTypes.h>
6ae0d525
#include <BString.h> #include <BError.h> /// File operations class class BFile { public: BFile(); BFile(const BFile& file); ///< Create opened specified file ~BFile(); BError open(BString name, BString mode); ///< Open file BError open(FILE* file); ///< Assign object to opened file handle
57456599
BError open(int fd, BString mode); ///< Assign object to opened file descriptor
6ae0d525
BError close(); ///< Close file
57456599
int isOpen(); ///< Returns 1 if the file is open int isEnd(); ///< Returns 1 if at the end of the file, 0 otherwise
6ae0d525
FILE* getFd(); ///< File descriptor
57456599
BUInt64 length(); ///< File size in bytes
6ae0d525
int setVBuf(char* buf, int mode, size_t size); ///< Set stream buffering options int read(void* buf, int nbytes); ///< Read from file int readString(BString& str); ///< Read string. (ref fgets)
57456599
char* fgets(char* buf, size_t size);
6ae0d525
int write(const void* buf, int nbytes); ///< Write to file int writeString(const BString& str); ///< Write string to file
57456599
int seek(BUInt64 pos); ///< Set seek position BUInt64 position(); ///< The files position
6ae0d525
int printf(const char* fmt, ...); ///< Formated print into the file
57456599
BError truncate(); ///< Truncate the file BError flush(); ///< Flush the file BString fileName(); ///< Return file name
6ae0d525
BFile& operator=(const BFile& file); private: FILE* ofile; BString ofileName; BString omode; }; #endif