Samond Classes Library 1.2.6-STABLE build 219
Classes
SCFileStream.h File Reference

Class SCFileStream header file. More...

#import <Foundation/Foundation.h>
#import <scl/SCStream.h>

Go to the source code of this file.

Classes

class  SCFileStream
 File stream class. More...
 

Class Constants

#define SCFileStreamClass   @"SCFileStream"
 

File Stream Support Types

enum  SCFileStreamStatusCode {
  SCFileStreamOK = 0, SCFileStreamIncorrectOpenModeError = -20033, SCFileStreamEmptyPathError = -20034, SCFileStreamEOFError = -20035,
  SCFileStreamOffsetError = -20036, SCFileStreamOffsetWhenceError = -20037
}
 
enum  SCFileStreamOpenMode {
  SCFileStreamOpenReadOnly = 0, SCFileStreamOpenReadWrite = 1, SCFileStreamOpenWriteOnly = 2, SCFileStreamOpenWriteRead = 3,
  SCFileStreamOpenAppendWriteOnly = 4, SCFileStreamOpenAppendReadWrite = 5
}
 
enum  SCFileStreamOffsetWhence { SCFileStreamOffsetStart = SEEK_SET, SCFileStreamOffsetCurrent = SEEK_CUR, SCFileStreamOffsetEnd = SEEK_END }
 
typedef SCStreamStatus SCFileStreamStatus
 

Detailed Description

Class SCFileStream header file.

SDK
macOS 10.6+, iOS 7.0+, GNUstep
Since
version 1.1.3

Contains the declaration of the file stream class SCFileStream.

Macro Definition Documentation

#define SCFileStreamClass   @"SCFileStream"

A name of the class SCFileStream

Typedef Documentation

Defines a status of the file stream

Enumeration Type Documentation

Declares a set of contants that indicate the whence of the stream offset

Enumerator
SCFileStreamOffsetStart 

Offset is set from the file stream start

SCFileStreamOffsetCurrent 

Offset is set from the current position

SCFileStreamOffsetEnd 

Offset is set from the file stream end

Declares a set of constants that indicate the modes of the file stream

Enumerator
SCFileStreamOpenReadOnly 

Open file for reading.
The stream is positioned at the beginning of the file.

SCFileStreamOpenReadWrite 

Open file for reading and writing.
The stream is positioned at the beginning of the file.

SCFileStreamOpenWriteOnly 

Truncate file to zero length or create file for writing.
The stream is positioned at the beginning of the file.

SCFileStreamOpenWriteRead 

Open for reading and writing.
The file is created if it does not exist, otherwise it is truncated.
The stream is positioned at the beginning of the file.

SCFileStreamOpenAppendWriteOnly 

Open for writing.
The file is created if it does not exists.
The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

SCFileStreamOpenAppendReadWrite 

Open for reading and writing.
The file is created if it does not exist.
The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Declares a set of constants that indicate the file stream status

Enumerator
SCFileStreamOK 

No errors

SCFileStreamIncorrectOpenModeError 

Incorrect file stream opening mode

SCFileStreamEmptyPathError 

Empty path to the file stream

SCFileStreamEOFError 

End of stream detected

SCFileStreamOffsetError 

Incorrect stream offset

SCFileStreamOffsetWhenceError 

Incorrect stream offset whence