Encapsulates libfat-based files, as provided by the libfat DS library. More...
#include <CeylanLibfatFile.h>
Public Types | |
enum | TextOutputFormat { rawText, html } |
Defines what text output formats for TextDisplayable instances are available. More... | |
Public Member Functions | |
virtual | ~LibfatFile () throw () |
Destroys the libfat file reference object, does not remove the file itself. | |
virtual bool | isOpen () const |
Returns true iff this file is open. | |
virtual bool | close () |
Closes the file for read/write actions. | |
virtual void | saveAs (const std::string &newName) |
Saves the file under a new name. | |
virtual time_t | getLastChangeTime () const |
Returns the latest change time of this libfat file. | |
virtual Size | read (Ceylan::Byte *buffer, Size maxLength) |
Reads up to maxLength bytes from this file to specified buffer. | |
virtual Size | write (const std::string &message) |
Writes message to this file. | |
virtual Size | write (const Ceylan::Byte *buffer, Size maxLength) |
Writes up to maxLength bytes from the specified buffer to this file. | |
virtual Position | tell () |
Determines current position within this file. | |
virtual void | seek (Position targetPosition) |
Seeks to specified position within this file. | |
virtual void | serialize (FileDescriptor fd) const |
Sends the file content to the fd file descriptor stream. | |
FileDescriptor | getFileDescriptor () const |
Returns the stream id, its file descriptor. | |
virtual StreamID | getStreamID () const |
Returns this file's ID. | |
virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const |
Returns an user-friendly description of the state of this object. | |
const std::string & | getName () const |
Returns this file's name. | |
virtual void | lockForReading () const |
Locks the file for reading. | |
virtual void | unlockForReading () const |
Unlocks the file for reading. | |
virtual void | lockForWriting () const |
Locks the file for writing. | |
virtual void | unlockForWriting () const |
Unlocks the file for writing. | |
virtual bool | isLocked () const |
Tells whether the file is locked. | |
virtual Size | size () const |
Returns the file size, in bytes. | |
virtual void | readExactLength (Ceylan::Byte *buffer, Size exactLength) |
Reads exactly exactLength bytes from this file to specified buffer. | |
virtual bool | hasAvailableData () const |
Tells whether there is data available on input. | |
virtual void | open (OpeningFlag openFlag=CreateToWriteBinary, PermissionFlag permissionFlag=OwnerReadWrite) |
Tries to open file, useful if it was created with the DoNotOpen open flag. | |
virtual void | remove () |
Removes this file from disk. | |
virtual StreamID | getInputStreamID () const |
Returns this file descriptor for this file, or -1 if the file descriptor feature is not available. | |
virtual StreamID | getOutputStreamID () const |
Returns this file descriptor for this file, or -1 if the file descriptor feature is not available. | |
bool | isSelected () const |
Tells if the stream has data to read. | |
bool | isFaulty () const |
virtual void | clearInput () |
Clears the input stream. | |
virtual Ceylan::Sint8 | readSint8 () |
Returns a Ceylan::Sint8 read from this input stream. | |
virtual Ceylan::Uint8 | readUint8 () |
Returns a Ceylan::Uint8 read from this input stream. | |
virtual Ceylan::Sint16 | readSint16 () |
Returns a Ceylan::Sint16 read from this input stream. | |
virtual Ceylan::Uint16 | readUint16 () |
Returns a Ceylan::Uint16 read from this input stream. | |
virtual Ceylan::Sint32 | readSint32 () |
Returns a Ceylan::Sint32 read from this input stream. | |
virtual Ceylan::Uint32 | readUint32 () |
Returns a Ceylan::Uint32 read from this input stream. | |
virtual Ceylan::Float32 | readFloat32 () |
Returns a Ceylan::Float32 read from this input stream. | |
virtual Ceylan::Float64 | readFloat64 () |
Returns a Ceylan::Float64 read from this input stream. | |
virtual void | readString (std::string &result) |
Reads a string from this input stream, and stores it in the specified string. | |
virtual void | skipWhitespaces (Ceylan::Uint8 &firstNonSpace) |
Reads from this input stream as long as there are whitespaces to be read. | |
bool | isBlocking () const |
Tells whether this stream is in blocking mode (if true), or in non-blocking mode (if false). | |
virtual void | writeSint8 (Ceylan::Sint8 toWrite) |
Writes a Ceylan::Sint8 to this output stream. | |
virtual void | writeUint8 (Ceylan::Uint8 toWrite) |
Writes a Ceylan::Uint8 to this output stream. | |
virtual void | writeSint16 (Ceylan::Sint16 toWrite) |
Writes a Ceylan::Sint16 to this output stream. | |
virtual void | writeUint16 (Ceylan::Uint16 toWrite) |
Writes a Ceylan::Uint16 to this output stream. | |
virtual void | writeSint32 (Ceylan::Sint32 toWrite) |
Writes a Ceylan::Sint32 to this output stream. | |
virtual void | writeUint32 (Ceylan::Uint32 toWrite) |
Writes a Ceylan::Uint32 to this output stream. | |
virtual void | writeFloat32 (Ceylan::Float32 toWrite) |
Writes a Ceylan::Uint32 to this output stream. | |
virtual void | writeFloat64 (Ceylan::Float64 toWrite) |
Writes a Ceylan::Uint32 to this output stream. | |
virtual void | writeString (const std::string &toWrite) |
Writes a string to this output stream. | |
Static Public Member Functions | |
static LibfatFile & | Create (const std::string &filename, OpeningFlag createFlag=CreateToWriteBinary) |
Returns a LibfatFile reference on a newly created file. | |
static LibfatFile & | Open (const std::string &filename, OpeningFlag openFlag=OpenToReadBinary) |
Returns a LibfatFile reference on specified already-existing file, which will be opened with specified settings. | |
static bool | ExistsAsFileOrSymbolicLink (const std::string &filename) |
Tells whether the regular file or symbolic link filename exists (and is not a directory). | |
static bool | Exists (const std::string &filename) |
Tells whether the regular file or symbolic link filename exists (and is not a directory). | |
static void | Remove (const std::string &filename) |
Removes the file or symbolic link from the filesystem. | |
static void | Move (const std::string &sourceFilename, const std::string &targetFilename) |
Moves specified file on filesystem. | |
static void | Copy (const std::string &sourceFilename, const std::string &targetFilename) |
Copies the file on filesystem. | |
static Size | GetSize (const std::string &filename) |
Returns the size, in bytes, of the specified file. | |
static time_t | GetLastChangeTime (const std::string &filename) |
Returns the last change time of the specified file. | |
static std::string | TransformIntoValidFilename (const std::string &rawFilename) |
Takes specified rawFilename and tries to transform it so that the result should be a valid name, from the filesystem's point of view. | |
static void | Touch (const std::string &filename) |
Updates the last access and modification times of specified file. | |
static bool | Diff (const std::string &firstFilename, const std::string &secondFilename) |
Tells whether the two specified files have exactly the same content (byte-wise). | |
static File & | Create (const std::string &filename, OpeningFlag createFlag=CreateToWriteBinary, PermissionFlag permissionFlag=OwnerReadWrite) |
static Ceylan::Uint16 | Select (std::list< InputStream * > &is) |
Blocks the calling thread until bytes become available on one or more streams in is. | |
static Ceylan::Uint16 | Test (std::list< InputStream * > &is) |
Checks whether bytes become available on one or more streams in is. | |
static bool | Close (FileDescriptor &fd) |
Closes and zeroes the specified file descriptor. | |
static const std::string | ToString (std::list< TextDisplayable * > displayables, Ceylan::VerbosityLevels level=Ceylan::high) |
Returns a user-friendly description of this list of pointers to text displayable instances. | |
static TextOutputFormat | GetOutputFormat () |
Returns the current overall text format to be used by TextDisplayable instances. | |
static void | SetOutputFormat (TextOutputFormat newOutputFormat) |
Sets the current overall text format to be used by TextDisplayable instances. | |
Static Public Attributes | |
static const OpeningFlag | Read = 0x0001 |
static const OpeningFlag | Write = 0x0002 |
static const OpeningFlag | CreateFile = 0x0004 |
Creates the file, if it does not exist. | |
static const OpeningFlag | TruncateFile = 0x0008 |
static const OpeningFlag | AppendFile = 0x0010 |
static const OpeningFlag | Binary = 0x0020 |
static const OpeningFlag | DoNotOpen = 0xffff |
static const OpeningFlag | CreateToWriteBinary |
static const OpeningFlag | OpenToReadBinary = Read | Binary |
static const OpeningFlag | NonBlocking = 0x0040 |
Opens the file in non-blocking mode, when possible. | |
static const OpeningFlag | Synchronous = 0x0080 |
Opens the file in synchronous mode. | |
static const PermissionFlag | OwnerRead = 0x0001 |
Allows its owner to read the created file. | |
static const PermissionFlag | OwnerWrite = 0x0002 |
Allows its owner to write to the created file. | |
static const PermissionFlag | OwnerExec = 0x0004 |
Allows its owner to execute the created file. | |
static const PermissionFlag | OwnerReadWrite |
Provided for convenience: OwnerReadWrite = OwnerRead | OwnerWrite. | |
static const PermissionFlag | OwnerReadWriteExec |
Provided for convenience: OwnerReadWriteExec = OwnerReadWrite | OwnerExec. | |
static const PermissionFlag | GroupRead = 0x0008 |
Allows the group to read the created file. | |
static const PermissionFlag | GroupWrite = 0x0010 |
Allows the group to write the created file. | |
static const PermissionFlag | GroupExec = 0x0020 |
Allows the group to execute the created file. | |
static const PermissionFlag | GroupReadWrite |
Provided for convenience: GroupReadWrite = GroupRead | GroupWrite. | |
static const PermissionFlag | GroupReadWriteExec |
Provided for convenience: GroupReadWriteExec = GroupReadWrite | GroupExec. | |
static const PermissionFlag | OthersRead = 0x0040 |
Allows the others (not owner, not group) to read the created file. | |
static const PermissionFlag | OthersWrite = 0x0080 |
Allows the others (not owner, not group) to write to the created file. | |
static const PermissionFlag | OthersExec = 0x0100 |
Allows the others (not owner, not group) to execute the created file. | |
static const PermissionFlag | OthersReadWrite |
Provided for convenience: OthersReadWrite = OthersRead | OthersWrite. | |
static const PermissionFlag | OthersReadWriteExec |
Provided for convenience: OthersReadWriteExec = OthersReadWrite | OthersExec. | |
static const Size | UsualBufferSize = 10240 |
Describes buffer size for usual I/O operations. | |
static const Size | BigBufferSize = 1<<19 |
Describes buffer size for significant I/O operations. | |
Protected Member Functions | |
LibfatFile (const std::string &name, OpeningFlag openFlag=CreateToWriteBinary) | |
Constructs a libfat file reference object. | |
LibfatFile (const std::string &name, Size length, FileDescriptor fd) | |
Constructs a libfat file with size length from file descriptor fd. | |
virtual FileSystemManager & | getCorrespondingFileSystemManager () const |
Returns the libfat filesystem manager. | |
virtual void | reopen () |
Tries to reopen file. | |
std::string | interpretState () const |
Interprets the current state of this file. | |
virtual void | setSelected (bool newStatus) |
Used to set the selection status of this stream. | |
void | setFaulty (bool newFaultyState=true) |
Sets the faulty state of this stream. | |
virtual void | setStreamID (StreamID newInputStreamID) |
Sets this input stream's unique ID. | |
virtual void | setBlocking (bool newStatus) |
Sets the blocking mode of this stream. | |
Static Protected Member Functions | |
static int | ConvertToFileDescriptorOpenFlag (OpeningFlag openFlag) |
Converts specified Ceylan opening flag into a valid opening flag to be used with file descriptor functions. | |
static FileSystemManager & | GetCorrespondingFileSystemManager () |
Returns the filesystem manager that should be used by File static methods, which is the default manager. | |
Protected Attributes | |
std::string | _name |
Name of the file. | |
OpeningFlag | _openFlag |
Flags used for opening. | |
PermissionFlag | _permissions |
Permissions used for opening. | |
bool | _lockedForReading: 1 |
Bit field for access locks. | |
bool | _lockedForWriting: 1 |
bool | _isBlocking |
Stores whether the stream is in blocking mode. | |
Static Protected Attributes | |
static TextOutputFormat | _OutputFormat = rawText |
The text format to be used currently by TextDisplayable instances. | |
Private Member Functions | |
LibfatFile (const LibfatFile &source) | |
Copy constructor made private to ensure that it will be never called. | |
LibfatFile & | operator= (const LibfatFile &source) |
Assignment operator made private to ensure that it will be never called. | |
Static Private Member Functions | |
static void | FromFDtoFD (FileDescriptor from, FileDescriptor to, Size length) |
Transfers bytes from a file descriptor to another. | |
Private Attributes | |
FileDescriptor | _fdes |
Internal file descriptor. |
Encapsulates libfat-based files, as provided by the libfat DS library.
Actual files should be created and opened with respectively the File::Create and File::Open factories, that allow the user program to be cross-platform by hiding each filesystem-related per-platform specificity.
Definition at line 80 of file CeylanLibfatFile.h.
enum Ceylan::TextDisplayable::TextOutputFormat [inherited] |
Defines what text output formats for TextDisplayable instances are available.
Definition at line 124 of file CeylanTextDisplayable.h.
LibfatFile::~LibfatFile | ( | ) | throw () [virtual] |
Destroys the libfat file reference object, does not remove the file itself.
To remove the file from disk, use remove().
Definition at line 109 of file CeylanLibfatFile.cc.
References close(), dataUtils::e, isOpen(), and Ceylan::Exception::toString().
LibfatFile::LibfatFile | ( | const std::string & | name, | |
OpeningFlag | openFlag = CreateToWriteBinary | |||
) | [explicit, protected] |
Constructs a libfat file reference object.
By default, it creates a new file on card, if the name corresponds to an already-existing file, it will be truncated and overwritten.
name | the name of the file. | |
openFlag | the flag describing the opening mode. |
FileException | if the operation failed. |
Definition at line 608 of file CeylanLibfatFile.cc.
References Ceylan::System::File::DoNotOpen, reopen(), and Ceylan::System::LibfatFileSystemManager::SecureLibfatFileSystemManager().
Ceylan::System::LibfatFile::LibfatFile | ( | const std::string & | name, | |
Size | length, | |||
FileDescriptor | fd | |||
) | [protected] |
Constructs a libfat file with size length from file descriptor fd.
name | the name of the file. | |
length | the file size. | |
fd | the file descriptor to use. |
FileException | if the operation failed. |
Ceylan::System::LibfatFile::LibfatFile | ( | const LibfatFile & | source | ) | [private] |
Copy constructor made private to ensure that it will be never called.
The compiler should complain whenever this undefined constructor is called, implicitly or not.
void InputStream::clearInput | ( | ) | [virtual, inherited] |
Clears the input stream.
InputStream::ReadFailedException | if the operation failed. |
Reimplemented in Ceylan::System::Pipe.
Definition at line 179 of file CeylanInputStream.cc.
References dataUtils::b, Ceylan::System::InputStream::hasAvailableData(), and Ceylan::System::InputStream::read().
bool Stream::Close | ( | FileDescriptor & | fd | ) | [static, inherited] |
Closes and zeroes the specified file descriptor.
It is passed by address so that this function can set it to zero on successful close.
CloseException | if the close operation failed. |
Definition at line 114 of file CeylanStream.cc.
References Ceylan::System::Stream::close(), generalUtils::false, Ceylan::toString(), and generalUtils::true.
Referenced by Ceylan::System::StandardFile::close(), Ceylan::Network::Socket::close(), Ceylan::System::Pipe::close(), and close().
bool LibfatFile::close | ( | ) | [virtual] |
Closes the file for read/write actions.
Stream::CloseException | if the close operation failed. |
Implements Ceylan::System::File.
Definition at line 169 of file CeylanLibfatFile.cc.
References _fdes, Ceylan::System::File::_name, Ceylan::System::Stream::Close(), generalUtils::false, and isOpen().
Referenced by ~LibfatFile().
int LibfatFile::ConvertToFileDescriptorOpenFlag | ( | OpeningFlag | openFlag | ) | [static, protected] |
Converts specified Ceylan opening flag into a valid opening flag to be used with file descriptor functions.
openFlag | the Ceylan opening flag to convert to lower-level flag. |
ConversionFailed | if the mapping failed. |
Definition at line 714 of file CeylanLibfatFile.cc.
References Ceylan::System::File::AppendFile, Ceylan::System::File::CreateFile, Ceylan::System::File::DoNotOpen, Ceylan::System::File::Read, Ceylan::System::File::TruncateFile, and Ceylan::System::File::Write.
Referenced by reopen().
void File::Copy | ( | const std::string & | sourceFilename, | |
const std::string & | targetFilename | |||
) | [static, inherited] |
Copies the file on filesystem.
sourceFilename | the filename of the file to be copied. | |
targetFilename | the new filename of the copied file. |
CopyFailed | if the operation failed or is not supported on this platform, or FileDelegatingException if the relevant filesystem manager could not be retrieved. |
Definition at line 213 of file CeylanFile.cc.
References Ceylan::System::FileSystemManager::copyFile(), and Ceylan::System::File::GetCorrespondingFileSystemManager().
File & File::Create | ( | const std::string & | filename, | |
OpeningFlag | createFlag = CreateToWriteBinary , |
|||
PermissionFlag | permissionFlag = OwnerReadWrite | |||
) | [static, inherited] |
Reimplemented in Ceylan::System::StandardFile.
Definition at line 289 of file CeylanFile.cc.
References Ceylan::System::FileSystemManager::createFile(), and Ceylan::System::File::GetCorrespondingFileSystemManager().
Referenced by Ceylan::System::getSchedulingGranularity(), and Ceylan::Log::LogAggregatorRaw::LogAggregatorRaw().
LibfatFile & LibfatFile::Create | ( | const std::string & | filename, | |
OpeningFlag | createFlag = CreateToWriteBinary | |||
) | [static] |
Returns a LibfatFile reference on a newly created file.
By default, it creates a new file on disk. If the name corresponds to an already-existing file, it will be truncated and overwritten.
filename | the name of the file to be created. | |
createFlag | the flag describing the creation mode. |
FileException,including | FileCreationFailed if the operation failed. |
Definition at line 582 of file CeylanLibfatFile.cc.
References Ceylan::System::File::CreateFile, and LibfatFile().
Referenced by Ceylan::System::LibfatFileSystemManager::createFile(), and saveAs().
bool File::Diff | ( | const std::string & | firstFilename, | |
const std::string & | secondFilename | |||
) | [static, inherited] |
Tells whether the two specified files have exactly the same content (byte-wise).
firstFilename | the filename of the first file to compare. | |
secondFilename | the filename of the second file to compare. |
DiffFailed | if the operation failed or is not supported on this platform, or FileDelegatingException if the relevant filesystem manager could not be retrieved. |
Definition at line 270 of file CeylanFile.cc.
References Ceylan::System::FileSystemManager::diff(), and Ceylan::System::File::GetCorrespondingFileSystemManager().
bool File::Exists | ( | const std::string & | filename | ) | [static, inherited] |
Tells whether the regular file or symbolic link filename exists (and is not a directory).
filename | the filename to look-up. |
This method will work as expected whether the symbolic link feature is enabled or not.
FileException,including | FileLookupFailed if the operation failed (existence test failed with no answer) or is not supported on this platform, or FileDelegatingException if the relevant filesystem manager could not be retrieved. |
Definition at line 182 of file CeylanFile.cc.
References Ceylan::System::File::ExistsAsFileOrSymbolicLink().
bool File::ExistsAsFileOrSymbolicLink | ( | const std::string & | filename | ) | [static, inherited] |
Tells whether the regular file or symbolic link filename exists (and is not a directory).
filename | the filename to look-up. |
This method will work as expected whether the symbolic link feature is enabled or not.
FileException,including | FileLookupFailed if the operation failed (existence test failed with no answer) or is not supported on this platform, or FileDelegatingException if the relevant filesystem manager could not be retrieved. |
Definition at line 171 of file CeylanFile.cc.
References Ceylan::System::FileSystemManager::existsAsFileOrSymbolicLink(), and Ceylan::System::File::GetCorrespondingFileSystemManager().
Referenced by Ceylan::System::File::Exists(), and Ceylan::System::FileLocator::find().
void LibfatFile::FromFDtoFD | ( | FileDescriptor | from, | |
FileDescriptor | to, | |||
Size | length | |||
) | [static, private] |
Transfers bytes from a file descriptor to another.
from | the source file descriptor. | |
to | the target file descriptor. | |
length | the length of the transfer, in bytes. |
LibfatFileException | if the operation failed. |
Definition at line 786 of file CeylanLibfatFile.cc.
References Ceylan::System::File::BigBufferSize, dataUtils::e, Ceylan::System::FDRead(), Ceylan::System::FDWrite(), Ceylan::System::LibfatFileSystemManager::SecureLibfatFileSystemManager(), and Ceylan::Exception::toString().
Referenced by serialize().
FileSystemManager & File::GetCorrespondingFileSystemManager | ( | ) | [static, protected, inherited] |
Returns the filesystem manager that should be used by File static methods, which is the default manager.
FileDelegatingException | if the operation failed. |
Definition at line 573 of file CeylanFile.cc.
References dataUtils::e, Ceylan::System::FileSystemManager::GetAnyDefaultFileSystemManager(), and Ceylan::Exception::toString().
Referenced by Ceylan::System::File::Copy(), Ceylan::System::File::Create(), Ceylan::System::File::Diff(), Ceylan::System::File::ExistsAsFileOrSymbolicLink(), Ceylan::System::File::GetLastChangeTime(), Ceylan::System::File::GetSize(), Ceylan::System::File::Move(), Ceylan::System::File::Open(), Ceylan::System::File::Remove(), Ceylan::System::File::Touch(), and Ceylan::System::File::TransformIntoValidFilename().
FileSystemManager & LibfatFile::getCorrespondingFileSystemManager | ( | ) | const [protected, virtual] |
Returns the libfat filesystem manager.
FileDelegatingException | if the operation failed. |
Implements Ceylan::System::File.
Definition at line 646 of file CeylanLibfatFile.cc.
References dataUtils::e, Ceylan::System::LibfatFileSystemManager::GetLibfatFileSystemManager(), and Ceylan::Exception::toString().
FileDescriptor LibfatFile::getFileDescriptor | ( | ) | const |
Returns the stream id, its file descriptor.
LibfatFileException | if the operation failed. |
Definition at line 507 of file CeylanLibfatFile.cc.
References _fdes.
Referenced by getStreamID(), and toString().
StreamID File::getInputStreamID | ( | ) | const [virtual, inherited] |
Returns this file descriptor for this file, or -1 if the file descriptor feature is not available.
Implements Ceylan::System::InputStream.
Definition at line 515 of file CeylanFile.cc.
References Ceylan::System::File::getStreamID().
time_t File::GetLastChangeTime | ( | const std::string & | filename | ) | [static, inherited] |
Returns the last change time of the specified file.
filename | the filename whose last change time is searched. |
FileLastChangeTimeRequestFailed | if the operation failed or is not supported on this platform, or FileDelegatingException if the relevant filesystem manager could not be retrieved. |
Definition at line 234 of file CeylanFile.cc.
References Ceylan::System::File::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::getLastChangeTimeFile().
time_t LibfatFile::getLastChangeTime | ( | ) | const [virtual] |
Returns the latest change time of this libfat file.
On Nintendo DS, usual locking primitives are not available, hence we do not override the implementations inherited from File.
FileLastChangeTimeRequestFailed | if the operation failed. |
Implements Ceylan::System::File.
Definition at line 266 of file CeylanLibfatFile.cc.
References Ceylan::System::File::_name, and Ceylan::System::explainError().
const std::string & File::getName | ( | ) | const [inherited] |
Returns this file's name.
Definition at line 333 of file CeylanFile.cc.
References Ceylan::System::File::_name.
TextDisplayable::TextOutputFormat TextDisplayable::GetOutputFormat | ( | ) | [static, inherited] |
Returns the current overall text format to be used by TextDisplayable instances.
Definition at line 63 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::formatStringList(), Ceylan::formatStringMap(), Ceylan::XML::XMLMarkup::toString(), Ceylan::Maths::Linear::Vector3::toString(), Ceylan::Maths::Linear::Vector2::toString(), Ceylan::Maths::Linear::Tripoint::toString(), Ceylan::Module::toString(), Ceylan::Maths::Linear::Matrix3::toString(), Ceylan::Maths::Linear::Matrix2::toString(), Ceylan::Maths::Linear::HomogeneousMatrix3::toString(), and Ceylan::Maths::Linear::Bipoint::toString().
StreamID File::getOutputStreamID | ( | ) | const [virtual, inherited] |
Returns this file descriptor for this file, or -1 if the file descriptor feature is not available.
Implements Ceylan::System::OutputStream.
Definition at line 524 of file CeylanFile.cc.
References Ceylan::System::File::getStreamID().
Size File::GetSize | ( | const std::string & | filename | ) | [static, inherited] |
Returns the size, in bytes, of the specified file.
filename | the filename whose size is searched. |
FileSizeRequestFailed | if the operation failed or is not supported on this platform, or FileDelegatingException if the relevant filesystem manager could not be retrieved. |
Definition at line 224 of file CeylanFile.cc.
References Ceylan::System::File::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::getSize().
StreamID LibfatFile::getStreamID | ( | ) | const [virtual] |
Returns this file's ID.
Implements Ceylan::System::File.
Definition at line 534 of file CeylanLibfatFile.cc.
References getFileDescriptor().
bool File::hasAvailableData | ( | ) | const [virtual, inherited] |
Tells whether there is data available on input.
This methods returns always true for files.
Implements Ceylan::System::InputStream.
Definition at line 467 of file CeylanFile.cc.
References generalUtils::true.
string LibfatFile::interpretState | ( | ) | const [protected, virtual] |
Interprets the current state of this file.
Implements Ceylan::System::File.
Definition at line 701 of file CeylanLibfatFile.cc.
References _fdes, and toString().
bool Stream::isBlocking | ( | ) | const [inherited] |
Tells whether this stream is in blocking mode (if true), or in non-blocking mode (if false).
Definition at line 93 of file CeylanStream.cc.
References Ceylan::System::Stream::_isBlocking.
Referenced by Ceylan::Network::StreamSocket::createSocket(), and Ceylan::Network::Socket::toString().
bool InputStream::isFaulty | ( | ) | const [inherited] |
Definition at line 131 of file CeylanInputStream.cc.
References Ceylan::System::InputStream::_isFaulty.
Referenced by Ceylan::System::InputStream::toString().
bool File::isLocked | ( | ) | const [virtual, inherited] |
Tells whether the file is locked.
This default implementation, meant to be overriden, returns always false.
Reimplemented in Ceylan::System::StandardFile.
Definition at line 395 of file CeylanFile.cc.
References generalUtils::false.
bool LibfatFile::isOpen | ( | ) | const [virtual] |
Returns true iff this file is open.
Implements Ceylan::System::File.
Definition at line 144 of file CeylanLibfatFile.cc.
References _fdes, and generalUtils::false.
Referenced by close(), and ~LibfatFile().
bool InputStream::isSelected | ( | ) | const [inherited] |
Tells if the stream has data to read.
Definition at line 122 of file CeylanInputStream.cc.
References Ceylan::System::InputStream::_isSelected.
Referenced by Ceylan::System::InputStream::toString().
void File::lockForReading | ( | ) | const [virtual, inherited] |
Locks the file for reading.
FileReadLockingFailed | if the operation failed or if the file lock feature is not available. |
This default implementation, meant to be overriden, throws this exception if called.
Reimplemented in Ceylan::System::StandardFile.
Definition at line 347 of file CeylanFile.cc.
void File::lockForWriting | ( | ) | const [virtual, inherited] |
Locks the file for writing.
FileWriteLockingFailed | if the operation failed or if the file lock feature is not available. |
This default implementation, meant to be overriden, throws this exception if called.
Reimplemented in Ceylan::System::StandardFile.
Definition at line 371 of file CeylanFile.cc.
void File::Move | ( | const std::string & | sourceFilename, | |
const std::string & | targetFilename | |||
) | [static, inherited] |
Moves specified file on filesystem.
A special case of file moving is file renaming.
sourceFilename | the filename of the file to be moved. | |
targetFilename | the target filename of the moved file. |
FileException,including | FileMoveFailed if the operation failed or is not supported on this platform, or FileDelegatingException if the relevant filesystem manager could not be retrieved. |
Definition at line 202 of file CeylanFile.cc.
References Ceylan::System::File::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::moveFile().
void File::open | ( | OpeningFlag | openFlag = CreateToWriteBinary , |
|
PermissionFlag | permissionFlag = OwnerReadWrite | |||
) | [virtual, inherited] |
Tries to open file, useful if it was created with the DoNotOpen open flag.
FileException,including | FileAlreadyOpened if file was already opened, and FileOpeningFailed if an error occurred, if the operation failed or is not supported. |
Definition at line 477 of file CeylanFile.cc.
References Ceylan::System::File::_name, Ceylan::System::File::_openFlag, Ceylan::System::File::_permissions, Ceylan::System::File::DoNotOpen, and Ceylan::System::File::reopen().
Referenced by Ceylan::System::StandardFile::reopen(), and reopen().
LibfatFile & LibfatFile::Open | ( | const std::string & | filename, | |
OpeningFlag | openFlag = OpenToReadBinary | |||
) | [static] |
Returns a LibfatFile reference on specified already-existing file, which will be opened with specified settings.
filename | the name of the file to open. | |
openFlag | the flag describing the opening mode. |
FileException,including | FileOpeningFailed if the operation failed. |
Reimplemented from Ceylan::System::File.
Definition at line 593 of file CeylanLibfatFile.cc.
References Ceylan::System::File::CreateFile, and LibfatFile().
Referenced by Ceylan::System::LibfatFileSystemManager::copyFile(), and Ceylan::System::LibfatFileSystemManager::openFile().
LibfatFile& Ceylan::System::LibfatFile::operator= | ( | const LibfatFile & | source | ) | [private] |
Assignment operator made private to ensure that it will be never called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
Size LibfatFile::read | ( | Ceylan::Byte * | buffer, | |
Size | maxLength | |||
) | [virtual] |
Reads up to maxLength bytes from this file to specified buffer.
buffer | the buffer where to store read bytes. Its size must be at least maxLength bytes. | |
maxLength | the maximum number of bytes that should be read. |
InputStream::ReadFailedException | if a read error occurred. Note that this is not a child class of FileException, as it comes from an inherited interface. |
Implements Ceylan::System::File.
Definition at line 301 of file CeylanLibfatFile.cc.
References _fdes, Ceylan::System::File::_name, dataUtils::e, Ceylan::System::FDRead(), Ceylan::System::InputStream::setSelected(), and Ceylan::Exception::toString().
void File::readExactLength | ( | Ceylan::Byte * | buffer, | |
Size | exactLength | |||
) | [virtual, inherited] |
Reads exactly exactLength bytes from this file to specified buffer.
buffer | the buffer where to store read bytes. Its size must be at least maxLength bytes. | |
maxLength | the maximum number of bytes that should be read. |
ReadFailed | if a read error occurred. |
Definition at line 416 of file CeylanFile.cc.
References dataUtils::e, Ceylan::System::File::read(), Ceylan::Exception::toString(), and Ceylan::toString().
Ceylan::Float32 InputStream::readFloat32 | ( | ) | [virtual, inherited] |
Returns a Ceylan::Float32 read from this input stream.
ReadFailedException | in case a system error occured, or EOFException is a protocol error occured, with fewer bytes available than expected. |
Definition at line 356 of file CeylanInputStream.cc.
References ceylan_bswap_32, and Ceylan::System::InputStream::read().
Referenced by Ceylan::Middleware::LightWeightMarshaller::decodeFloat32().
Ceylan::Float64 InputStream::readFloat64 | ( | ) | [virtual, inherited] |
Returns a Ceylan::Float64 read from this input stream.
ReadFailedException | in case a system error occured, or EOFException is a protocol error occured, with fewer bytes available than expected. |
Definition at line 392 of file CeylanInputStream.cc.
References Ceylan::byteswap(), ceylan_bswap_64, and Ceylan::System::InputStream::read().
Referenced by Ceylan::Middleware::LightWeightMarshaller::decodeFloat64().
Ceylan::Sint16 InputStream::readSint16 | ( | ) | [virtual, inherited] |
Returns a Ceylan::Sint16 read from this input stream.
ReadFailedException | in case a system error occured, or EOFException is a protocol error occured, with fewer bytes available than expected. |
Definition at line 239 of file CeylanInputStream.cc.
References ceylan_bswap_16, and Ceylan::System::InputStream::read().
Referenced by Ceylan::Middleware::LightWeightMarshaller::decodeSint16().
Ceylan::Sint32 InputStream::readSint32 | ( | ) | [virtual, inherited] |
Returns a Ceylan::Sint32 read from this input stream.
ReadFailedException | in case a system error occured, or EOFException is a protocol error occured, with fewer bytes available than expected. |
Definition at line 298 of file CeylanInputStream.cc.
References ceylan_bswap_32, and Ceylan::System::InputStream::read().
Referenced by Ceylan::Middleware::LightWeightMarshaller::decodeSint32().
Ceylan::Sint8 InputStream::readSint8 | ( | ) | [virtual, inherited] |
Returns a Ceylan::Sint8 read from this input stream.
ReadFailedException | in case a system error occured, or EOFException is a protocol error occured, with fewer bytes available than expected. |
Definition at line 203 of file CeylanInputStream.cc.
References Ceylan::System::InputStream::read().
Referenced by Ceylan::Middleware::LightWeightMarshaller::decodeSint8().
void InputStream::readString | ( | std::string & | result | ) | [virtual, inherited] |
Reads a string from this input stream, and stores it in the specified string.
result | the string to fill from this input stream. |
ReadFailedException | in case a system error occured, or EOFException is a protocol error occured, with fewer bytes available than expected. |
Definition at line 437 of file CeylanInputStream.cc.
References Ceylan::System::InputStream::read(), Ceylan::System::InputStream::readUint16(), and Ceylan::toString().
Referenced by Ceylan::Middleware::LightWeightMarshaller::decodeString().
Ceylan::Uint16 InputStream::readUint16 | ( | ) | [virtual, inherited] |
Returns a Ceylan::Uint16 read from this input stream.
ReadFailedException | in case a system error occured, or EOFException is a protocol error occured, with fewer bytes available than expected. |
Definition at line 268 of file CeylanInputStream.cc.
References ceylan_bswap_16, and Ceylan::System::InputStream::read().
Referenced by Ceylan::Middleware::LightWeightMarshaller::decodeUint16(), and Ceylan::System::InputStream::readString().
Ceylan::Uint32 InputStream::readUint32 | ( | ) | [virtual, inherited] |
Returns a Ceylan::Uint32 read from this input stream.
ReadFailedException | in case a system error occured, or EOFException is a protocol error occured, with fewer bytes available than expected. |
Definition at line 327 of file CeylanInputStream.cc.
References ceylan_bswap_32, and Ceylan::System::InputStream::read().
Referenced by Ceylan::Middleware::LightWeightMarshaller::decodeUint32().
Ceylan::Uint8 InputStream::readUint8 | ( | ) | [virtual, inherited] |
Returns a Ceylan::Uint8 read from this input stream.
ReadFailedException | in case a system error occured, or EOFException is a protocol error occured, with fewer bytes available than expected. |
Definition at line 221 of file CeylanInputStream.cc.
References Ceylan::System::InputStream::read().
Referenced by Ceylan::Middleware::LightWeightMarshaller::decodeUint8(), Ceylan::System::FileSystemManager::diff(), Ceylan::XML::XMLParser::handleNextElement(), Ceylan::XML::XMLParser::InterpretLowerThanSequence(), Ceylan::XML::XMLParser::InterpretXMLDeclaration(), and Ceylan::System::InputStream::skipWhitespaces().
void File::remove | ( | ) | [virtual, inherited] |
Removes this file from disk.
Closes it if necessary. No other operation should be performed afterwards on that file.
FileRemoveFailed | if the operation failed or is not supported on this platform, and FileDelegatingException if the corresponding filesystem manager could not be used. |
Definition at line 493 of file CeylanFile.cc.
References Ceylan::System::File::_name, Ceylan::System::File::close(), dataUtils::e, Ceylan::System::File::getCorrespondingFileSystemManager(), Ceylan::System::FileSystemManager::removeFile(), and Ceylan::Exception::toString().
void File::Remove | ( | const std::string & | filename | ) | [static, inherited] |
Removes the file or symbolic link from the filesystem.
filename | the filename to remove. |
FileException,including | FileRemoveFailed if the operation failed or is not supported on this platform, or FileDelegatingException if the relevant filesystem manager could not be retrieved. |
Definition at line 192 of file CeylanFile.cc.
References Ceylan::System::File::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::removeFile().
void LibfatFile::reopen | ( | ) | [protected, virtual] |
Tries to reopen file.
FileOpeningFailed | if the operation failed. |
Implements Ceylan::System::File.
Definition at line 668 of file CeylanLibfatFile.cc.
References _fdes, Ceylan::System::File::_name, Ceylan::System::File::_openFlag, ConvertToFileDescriptorOpenFlag(), Ceylan::System::explainError(), and Ceylan::System::File::open().
Referenced by LibfatFile().
void LibfatFile::saveAs | ( | const std::string & | newName | ) | [virtual] |
Saves the file under a new name.
newName | the name of the newly copied file. |
FileException | if the operation failed. |
Implements Ceylan::System::File.
Definition at line 221 of file CeylanLibfatFile.cc.
References _fdes, Create(), dataUtils::f, and serialize().
void LibfatFile::seek | ( | Position | targetPosition | ) | [virtual] |
Seeks to specified position within this file.
targetPosition | this position corresponds to the number of bytes from start of file to seek to. |
FileException | if the operation failed. |
Implements Ceylan::System::File.
Definition at line 445 of file CeylanLibfatFile.cc.
Ceylan::Uint16 InputStream::Select | ( | std::list< InputStream * > & | is | ) | [static, inherited] |
Blocks the calling thread until bytes become available on one or more streams in is.
To see which are selected, use the isSelected
method.
SelectFailedException | if the operation failed, for example if the file descriptor feature is not available on this platform. |
Definition at line 534 of file CeylanInputStream.cc.
References Ceylan::System::explainError(), Ceylan::Network::explainSocketError(), Ceylan::System::getError(), Ceylan::Network::getSocketError(), Ceylan::System::Thread::Sleep(), and Ceylan::toString().
Referenced by Ceylan::Network::MultiplexedServerStreamSocket::run().
void LibfatFile::serialize | ( | FileDescriptor | fd | ) | const [virtual] |
Sends the file content to the fd file descriptor stream.
LibfatFileException | if the operation failed. |
Definition at line 479 of file CeylanLibfatFile.cc.
References _fdes, FromFDtoFD(), and Ceylan::System::File::size().
Referenced by saveAs().
void Stream::setBlocking | ( | bool | newStatus | ) | [protected, virtual, inherited] |
Sets the blocking mode of this stream.
newStatus | if true, sets the stream in blocking mode, if false set to non-blocking mode. If the stream is already in the target state, nothing is done. |
NonBlockingNotSupportedException | if the operation failed or is not supported. |
Reimplemented in Ceylan::Network::Socket, and Ceylan::Network::StreamSocket.
Definition at line 175 of file CeylanStream.cc.
void InputStream::setFaulty | ( | bool | newFaultyState = true |
) | [protected, inherited] |
Sets the faulty state of this stream.
newFaultyState | the new faulty state. |
Definition at line 1004 of file CeylanInputStream.cc.
References Ceylan::System::InputStream::_isFaulty.
Referenced by Ceylan::Network::MultiplexedServerStreamSocket::run().
void TextDisplayable::SetOutputFormat | ( | TextOutputFormat | newOutputFormat | ) | [static, inherited] |
Sets the current overall text format to be used by TextDisplayable instances.
newOutputFormat | the new output format. |
Definition at line 72 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::Log::LogHolder::LogHolder().
void InputStream::setSelected | ( | bool | newStatus | ) | [protected, virtual, inherited] |
Used to set the selection status of this stream.
Definition at line 989 of file CeylanInputStream.cc.
References Ceylan::System::InputStream::_isSelected, Ceylan::System::InputStream::getInputStreamID(), and Ceylan::toString().
Referenced by Ceylan::System::StandardFile::read(), Ceylan::System::Pipe::read(), and read().
void InputStream::setStreamID | ( | StreamID | newInputStreamID | ) | [protected, virtual, inherited] |
Sets this input stream's unique ID.
InputStreamException | in all cases as long as not specifically overriden. |
Definition at line 1013 of file CeylanInputStream.cc.
Size File::size | ( | ) | const [virtual, inherited] |
Returns the file size, in bytes.
FileException,including | FileLookupFailed if the file metadata could not be accessed or if the operation is not supported on this platform, and FileDelegatingException if the corresponding filesystem manager could not be used as expected. |
Definition at line 406 of file CeylanFile.cc.
References Ceylan::System::File::_name, Ceylan::System::File::getCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::getSize().
Referenced by Ceylan::System::StandardFile::serialize(), and serialize().
void InputStream::skipWhitespaces | ( | Ceylan::Uint8 & | firstNonSpace | ) | [virtual, inherited] |
Reads from this input stream as long as there are whitespaces to be read.
firstNonSpace | the variable which will be set by this method to the value of the first non-whitespace character that is read. |
Definition at line 516 of file CeylanInputStream.cc.
References Ceylan::isWhitespace(), and Ceylan::System::InputStream::readUint8().
Referenced by Ceylan::XML::XMLParser::handleNextElement().
Position LibfatFile::tell | ( | ) | [virtual] |
Determines current position within this file.
FileException | if the operation failed. |
Implements Ceylan::System::File.
Definition at line 417 of file CeylanLibfatFile.cc.
Ceylan::Uint16 InputStream::Test | ( | std::list< InputStream * > & | is | ) | [static, inherited] |
Checks whether bytes become available on one or more streams in is.
To see which are selected, use the isSelected
method.
This method returns always immediatly.
SelectFailedException | if the operation failed, for example if the file descriptor feature is not available on this platform. |
Definition at line 863 of file CeylanInputStream.cc.
References Ceylan::System::explainError(), and Ceylan::System::getError().
const std::string TextDisplayable::ToString | ( | std::list< TextDisplayable * > | displayables, | |
Ceylan::VerbosityLevels | level = Ceylan::high | |||
) | [static, inherited] |
Returns a user-friendly description of this list of pointers to text displayable instances.
displayables | a list of pointers to TextDisplayable instances/ | |
level | the requested verbosity level. |
Definition at line 45 of file CeylanTextDisplayable.cc.
References Ceylan::formatStringList().
const std::string LibfatFile::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const [virtual] |
Returns an user-friendly description of the state of this object.
level | the requested verbosity level. |
Reimplemented from Ceylan::System::File.
Definition at line 561 of file CeylanLibfatFile.cc.
References Ceylan::System::File::_name, Ceylan::System::File::_openFlag, Ceylan::System::File::_permissions, and getFileDescriptor().
Referenced by interpretState().
void File::Touch | ( | const std::string & | filename | ) | [static, inherited] |
Updates the last access and modification times of specified file.
This is not expected to work for directories.
filename | the filename of the file whose times must be updated. |
TouchFailed | if the operation failed or is not supported on this platform, or FileDelegatingException if the relevant filesystem manager could not be retrieved. |
Definition at line 260 of file CeylanFile.cc.
References Ceylan::System::File::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::touch().
string File::TransformIntoValidFilename | ( | const std::string & | rawFilename | ) | [static, inherited] |
Takes specified rawFilename and tries to transform it so that the result should be a valid name, from the filesystem's point of view.
rawFilename | the filename to convert |
Definition at line 249 of file CeylanFile.cc.
References Ceylan::System::File::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::transformIntoValidFilename().
void File::unlockForReading | ( | ) | const [virtual, inherited] |
Unlocks the file for reading.
FileReadUnlockingFailed | if the operation failed or if the file lock feature is not available. |
This default implementation, meant to be overriden, throws this exception if called.
Reimplemented in Ceylan::System::StandardFile.
Definition at line 359 of file CeylanFile.cc.
void File::unlockForWriting | ( | ) | const [virtual, inherited] |
Unlocks the file for writing.
FileWriteUnlockingFailed | if the operation failed or if the file lock feature is not available. |
This default implementation, meant to be overriden, throws this exception if called.
Reimplemented in Ceylan::System::StandardFile.
Definition at line 383 of file CeylanFile.cc.
Size LibfatFile::write | ( | const Ceylan::Byte * | buffer, | |
Size | maxLength | |||
) | [virtual] |
Writes up to maxLength bytes from the specified buffer to this file.
buffer | the buffer where to find bytes that must be written to this file. Its size must be at least maxLength bytes. |
OutputStream::WriteFailedException | if a write error occurred. Note that this is not a child class of FileException, as it comes from an inherited interface. |
Implements Ceylan::System::File.
Definition at line 379 of file CeylanLibfatFile.cc.
References _fdes, Ceylan::System::File::_name, dataUtils::e, Ceylan::System::FDWrite(), and Ceylan::Exception::toString().
Size LibfatFile::write | ( | const std::string & | message | ) | [virtual] |
Writes message to this file.
message | the message to write to this file. |
OutputStream::WriteFailedException | if a write error occurred. Note that this is not a child class of FileException, as it comes from an inherited interface. |
Implements Ceylan::System::File.
Definition at line 341 of file CeylanLibfatFile.cc.
References _fdes, Ceylan::System::File::_name, dataUtils::e, Ceylan::System::FDWrite(), and Ceylan::Exception::toString().
void OutputStream::writeFloat32 | ( | Ceylan::Float32 | toWrite | ) | [virtual, inherited] |
Writes a Ceylan::Uint32 to this output stream.
WriteFailedException | in case a system error occured. |
Definition at line 219 of file CeylanOutputStream.cc.
References ceylan_bswap_32, and Ceylan::System::OutputStream::write().
Referenced by Ceylan::Middleware::LightWeightMarshaller::encodeFloat32().
void OutputStream::writeFloat64 | ( | Ceylan::Float64 | toWrite | ) | [virtual, inherited] |
Writes a Ceylan::Uint32 to this output stream.
WriteFailedException | in case a system error occured. |
Definition at line 247 of file CeylanOutputStream.cc.
References Ceylan::byteswap(), ceylan_bswap_64, and Ceylan::System::OutputStream::write().
Referenced by Ceylan::Middleware::LightWeightMarshaller::encodeFloat64().
void OutputStream::writeSint16 | ( | Ceylan::Sint16 | toWrite | ) | [virtual, inherited] |
Writes a Ceylan::Sint16 to this output stream.
WriteFailedException | in case a system error occured. |
Definition at line 119 of file CeylanOutputStream.cc.
References ceylan_bswap_16, and Ceylan::System::OutputStream::write().
Referenced by Ceylan::Middleware::LightWeightMarshaller::encodeSint16().
void OutputStream::writeSint32 | ( | Ceylan::Sint32 | toWrite | ) | [virtual, inherited] |
Writes a Ceylan::Sint32 to this output stream.
WriteFailedException | in case a system error occured. |
Definition at line 169 of file CeylanOutputStream.cc.
References ceylan_bswap_32, and Ceylan::System::OutputStream::write().
Referenced by Ceylan::Middleware::LightWeightMarshaller::encodeSint32().
void OutputStream::writeSint8 | ( | Ceylan::Sint8 | toWrite | ) | [virtual, inherited] |
Writes a Ceylan::Sint8 to this output stream.
WriteFailedException | in case a system error occured. |
Definition at line 89 of file CeylanOutputStream.cc.
References Ceylan::System::OutputStream::write().
Referenced by Ceylan::Middleware::LightWeightMarshaller::encodeSint8().
void OutputStream::writeString | ( | const std::string & | toWrite | ) | [virtual, inherited] |
Writes a string to this output stream.
toWrite | the string to write to this output stream. |
WriteFailedException | in case a system error occured. |
Definition at line 286 of file CeylanOutputStream.cc.
References Ceylan::Log::LogPlug::debug(), Ceylan::toString(), Ceylan::Uint16Max, Ceylan::System::OutputStream::write(), and Ceylan::System::OutputStream::writeUint16().
Referenced by Ceylan::Middleware::LightWeightMarshaller::encodeString().
void OutputStream::writeUint16 | ( | Ceylan::Uint16 | toWrite | ) | [virtual, inherited] |
Writes a Ceylan::Uint16 to this output stream.
WriteFailedException | in case a system error occured. |
Definition at line 144 of file CeylanOutputStream.cc.
References ceylan_bswap_16, and Ceylan::System::OutputStream::write().
Referenced by Ceylan::Middleware::LightWeightMarshaller::encodeUint16(), and Ceylan::System::OutputStream::writeString().
void OutputStream::writeUint32 | ( | Ceylan::Uint32 | toWrite | ) | [virtual, inherited] |
Writes a Ceylan::Uint32 to this output stream.
WriteFailedException | in case a system error occured. |
Definition at line 194 of file CeylanOutputStream.cc.
References ceylan_bswap_32, and Ceylan::System::OutputStream::write().
Referenced by Ceylan::Middleware::LightWeightMarshaller::encodeUint32().
void OutputStream::writeUint8 | ( | Ceylan::Uint8 | toWrite | ) | [virtual, inherited] |
Writes a Ceylan::Uint8 to this output stream.
WriteFailedException | in case a system error occured. |
Definition at line 104 of file CeylanOutputStream.cc.
References Ceylan::System::OutputStream::write().
Referenced by Ceylan::Middleware::LightWeightMarshaller::encodeUint8(), and Ceylan::XML::XMLSavingVisitor::visit().
Internal file descriptor.
Definition at line 566 of file CeylanLibfatFile.h.
Referenced by close(), getFileDescriptor(), interpretState(), isOpen(), read(), reopen(), saveAs(), serialize(), and write().
bool Ceylan::System::Stream::_isBlocking [protected, inherited] |
Stores whether the stream is in blocking mode.
Definition at line 221 of file CeylanStream.h.
Referenced by Ceylan::System::Stream::isBlocking(), Ceylan::Network::StreamSocket::setBlocking(), Ceylan::Network::Socket::setBlocking(), and Ceylan::System::Stream::toString().
bool Ceylan::System::File::_lockedForReading [protected, inherited] |
Bit field for access locks.
Not used by all implementations.
Definition at line 1226 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::toString().
bool Ceylan::System::File::_lockedForWriting [protected, inherited] |
Definition at line 1226 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::toString().
std::string Ceylan::System::File::_name [protected, inherited] |
Name of the file.
Definition at line 1207 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::close(), close(), Ceylan::System::StandardFile::getLastChangeTime(), getLastChangeTime(), Ceylan::System::File::getName(), Ceylan::System::StandardFile::isLocked(), Ceylan::System::StandardFile::lockForReading(), Ceylan::System::StandardFile::lockForWriting(), Ceylan::System::File::open(), Ceylan::System::StandardFile::read(), read(), Ceylan::System::File::remove(), Ceylan::System::StandardFile::reopen(), reopen(), Ceylan::System::StandardFile::seek(), Ceylan::System::File::size(), Ceylan::System::StandardFile::tell(), Ceylan::System::StandardFile::toString(), toString(), Ceylan::System::File::toString(), Ceylan::System::StandardFile::unlockForReading(), Ceylan::System::StandardFile::unlockForWriting(), Ceylan::System::StandardFile::write(), and write().
OpeningFlag Ceylan::System::File::_openFlag [protected, inherited] |
Flags used for opening.
Definition at line 1212 of file CeylanFile.h.
Referenced by Ceylan::System::File::open(), Ceylan::System::StandardFile::reopen(), reopen(), Ceylan::System::StandardFile::toString(), toString(), and Ceylan::System::StandardFile::write().
TextDisplayable::TextOutputFormat TextDisplayable::_OutputFormat = rawText [static, protected, inherited] |
The text format to be used currently by TextDisplayable instances.
Definition at line 158 of file CeylanTextDisplayable.h.
Referenced by Ceylan::TextDisplayable::GetOutputFormat(), and Ceylan::TextDisplayable::SetOutputFormat().
PermissionFlag Ceylan::System::File::_permissions [protected, inherited] |
Permissions used for opening.
Definition at line 1217 of file CeylanFile.h.
Referenced by Ceylan::System::File::open(), Ceylan::System::StandardFile::reopen(), Ceylan::System::StandardFile::toString(), and toString().
const OpeningFlag File::AppendFile = 0x0010 [static, inherited] |
Definition at line 229 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorOpenFlag(), ConvertToFileDescriptorOpenFlag(), and Ceylan::System::StandardFile::ConvertToStreamOpenFlag().
const Size File::BigBufferSize = 1<<19 [static, inherited] |
Describes buffer size for significant I/O operations.
Definition at line 1139 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFileSystemManager::copyFile(), Ceylan::System::StandardFile::FromFDtoFD(), and FromFDtoFD().
const OpeningFlag File::Binary = 0x0020 [static, inherited] |
Definition at line 234 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToStreamOpenFlag().
const OpeningFlag File::CreateFile = 0x0004 [static, inherited] |
Creates the file, if it does not exist.
Could not be named 'Create' (static method of the same name exists already), thus CreateFile is used.
Definition at line 221 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorOpenFlag(), ConvertToFileDescriptorOpenFlag(), Ceylan::System::StandardFile::ConvertToStreamOpenFlag(), Ceylan::System::StandardFile::Create(), Create(), Ceylan::System::StandardFile::Open(), and Open().
const OpeningFlag File::CreateToWriteBinary [static, inherited] |
Read | Write | CreateFile | TruncateFile | Binary
Definition at line 248 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFileSystemManager::copyFile().
const OpeningFlag File::DoNotOpen = 0xffff [static, inherited] |
Definition at line 238 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorOpenFlag(), ConvertToFileDescriptorOpenFlag(), Ceylan::System::StandardFile::ConvertToStreamOpenFlag(), LibfatFile(), Ceylan::System::File::open(), and Ceylan::System::StandardFile::StandardFile().
const PermissionFlag File::GroupExec = 0x0020 [static, inherited] |
Allows the group to execute the created file.
Definition at line 369 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorPermissionFlag().
const PermissionFlag File::GroupRead = 0x0008 [static, inherited] |
Allows the group to read the created file.
Definition at line 348 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorPermissionFlag().
const PermissionFlag File::GroupReadWrite [static, inherited] |
Provided for convenience: GroupReadWrite = GroupRead | GroupWrite.
Definition at line 381 of file CeylanFile.h.
const PermissionFlag File::GroupReadWriteExec [static, inherited] |
Provided for convenience: GroupReadWriteExec = GroupReadWrite | GroupExec.
Definition at line 393 of file CeylanFile.h.
const PermissionFlag File::GroupWrite = 0x0010 [static, inherited] |
Allows the group to write the created file.
Definition at line 359 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorPermissionFlag().
const OpeningFlag File::NonBlocking = 0x0040 [static, inherited] |
Opens the file in non-blocking mode, when possible.
Neither the opening nor any subsequent operations on this file will cause the calling process to wait.
Definition at line 271 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorOpenFlag().
const OpeningFlag File::OpenToReadBinary = Read | Binary [static, inherited] |
Definition at line 257 of file CeylanFile.h.
const PermissionFlag File::OthersExec = 0x0100 [static, inherited] |
Allows the others (not owner, not group) to execute the created file.
Definition at line 439 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorPermissionFlag().
const PermissionFlag File::OthersRead = 0x0040 [static, inherited] |
Allows the others (not owner, not group) to read the created file.
Definition at line 415 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorPermissionFlag().
const PermissionFlag File::OthersReadWrite [static, inherited] |
Provided for convenience: OthersReadWrite = OthersRead | OthersWrite.
Definition at line 451 of file CeylanFile.h.
const PermissionFlag File::OthersReadWriteExec [static, inherited] |
Provided for convenience: OthersReadWriteExec = OthersReadWrite | OthersExec.
Definition at line 463 of file CeylanFile.h.
const PermissionFlag File::OthersWrite = 0x0080 [static, inherited] |
Allows the others (not owner, not group) to write to the created file.
Definition at line 427 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorPermissionFlag().
const PermissionFlag File::OwnerExec = 0x0004 [static, inherited] |
Allows its owner to execute the created file.
Definition at line 309 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorPermissionFlag().
const PermissionFlag File::OwnerRead = 0x0001 [static, inherited] |
Allows its owner to read the created file.
Definition at line 299 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorPermissionFlag().
const PermissionFlag File::OwnerReadWrite [static, inherited] |
Provided for convenience: OwnerReadWrite = OwnerRead | OwnerWrite.
Definition at line 318 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFileSystemManager::copyFile().
const PermissionFlag File::OwnerReadWriteExec [static, inherited] |
Provided for convenience: OwnerReadWriteExec = OwnerReadWrite | OwnerExec.
Definition at line 327 of file CeylanFile.h.
const PermissionFlag File::OwnerWrite = 0x0002 [static, inherited] |
Allows its owner to write to the created file.
Definition at line 304 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorPermissionFlag().
const OpeningFlag File::Read = 0x0001 [static, inherited] |
Definition at line 206 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorOpenFlag(), ConvertToFileDescriptorOpenFlag(), and Ceylan::System::StandardFile::ConvertToStreamOpenFlag().
const OpeningFlag File::Synchronous = 0x0080 [static, inherited] |
Opens the file in synchronous mode.
Any write operation on this file will block the calling process until the data has been physically written to the underlying hardware.
Definition at line 287 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorOpenFlag(), Ceylan::System::StandardFile::reopen(), and Ceylan::System::StandardFile::write().
const OpeningFlag File::TruncateFile = 0x0008 [static, inherited] |
Definition at line 225 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorOpenFlag(), ConvertToFileDescriptorOpenFlag(), and Ceylan::System::StandardFile::ConvertToStreamOpenFlag().
const Size File::UsualBufferSize = 10240 [static, inherited] |
Describes buffer size for usual I/O operations.
Definition at line 1135 of file CeylanFile.h.
const OpeningFlag File::Write = 0x0002 [static, inherited] |
Definition at line 210 of file CeylanFile.h.
Referenced by Ceylan::System::StandardFile::ConvertToFileDescriptorOpenFlag(), ConvertToFileDescriptorOpenFlag(), and Ceylan::System::StandardFile::ConvertToStreamOpenFlag().