Main Page Modules Class Hierarchy Data Structures File List Data Fields Globals Related Pages

# OSCL IO

## Files
file | oscl_dns.h
| The file oscl_socket.h defines the OSCL DNS APIs.

file | oscl_file_cache.h
| The file oscl_file_cache.h defines the class OsclFileCache.

file | oscl_file_dir_utils.h
| The file oscl_file_dir_utils.h defines some unix-style directory ops.

file | oscl_file_find.h
| The file oscl_file_find.h defines the class Oscl_FileFind.

file | oscl_file_handle.h
| The file oscl_file_handle.h defines the class OsclFileHandle.

file | oscl_file_io.h
| The file oscl_file_io.h defines the class Oscl_File. This is the public API to the basic file I/O operations.

file | oscl_file_manager.h
| File management class.

file | oscl_file_native.h
| The file oscl_file_native.h defines the class OsclNativeFile. This is the porting layer for basic file I/O operations.

file | oscl_file_server.h
| The file oscl_file_server.h defines the class Oscl_FileServer. This is the porting layer for file server implementations.

file | oscl_file_stats.h
| File stats class.

file | oscl_file_types.h
| The file oscl_file_types.h defines some constants and types for file I/O implementations. Anything that needs to be shared across implementation modules can go here.

file | oscl_socket.h
| The file oscl_socket.h defines the OSCL Socket APIs.

## Data Structures
class | Oscl_File
class | Oscl_FileFind
class | Oscl_FileServer
struct | oscl_fsstat
struct | oscl_stat_buf
class | OsclDNS
class | OsclDNSObserver
class | OsclFileCache
class | OsclFileCacheBuffer
class | OsclFileHandle
class | OsclFileManager
class | OsclFileStats
class | OsclFileStatsItem
class | OsclNativeFile
class | OsclNativeFileParams
class | OsclSocketServ
class | OsclTCPSocket
class | OsclUDPSocket
## Defines
#define | TOsclFileOffsetInt32 int32
#define | OSCL_FILE_STATS_LOGGER_NODE "OsclFileStats"
#define | OSCL_IO_FILENAME_MAXLEN 512
#define | OSCL_IO_EXTENSION_MAXLEN 512
#define | OSCL_FILE_WCHAR_PATH_DELIMITER _STRLIT("/")
#define | OSCL_FILE_CHAR_PATH_DELIMITER _STRLIT_CHAR("/")
## Typedefs
typedef oscl_fsstat | OSCL_FSSTAT
typedef oscl_stat_buf | OSCL_STAT_BUF
typedef FILE * | TOsclFileHandle
## Enumerations
enum | TPVDNSFxn { EPVDNSGetHostByName }
enum | TPVDNSEvent { EPVDNSSuccess, EPVDNSPending, EPVDNSTimeout, EPVDNSFailure, EPVDNSCancel }
enum | OSCL_FILEMGMT_PERMS { OSCL_FILEMGMT_PERMS_READ = 0x1, OSCL_FILEMGMT_PERMS_WRITE = 0x2, OSCL_FILEMGMT_PERMS_EXECUTE = 0x4 }
enum | OSCL_FILEMGMT_MODES { OSCL_FILEMGMT_MODE_DIR = 0x1 }
enum | OSCL_FILEMGMT_ERR_TYPE { OSCL_FILEMGMT_E_OK = 0, OSCL_FILEMGMT_E_PATH_TOO_LONG, OSCL_FILEMGMT_E_PATH_NOT_FOUND, OSCL_FILEMGMT_E_ALREADY_EXISTS, OSCL_FILEMGMT_E_NOT_EMPTY, OSCL_FILEMGMT_E_PERMISSION_DENIED, OSCL_FILEMGMT_E_NO_MATCH, OSCL_FILEMGMT_E_UNKNOWN, OSCL_FILEMGMT_E_SYS_SPECIFIC, OSCL_FILEMGMT_E_NOT_IMPLEMENTED }
enum | TOsclFileOp { EOsclFileOp_Open, EOsclFileOp_Close, EOsclFileOp_Read, EOsclFileOp_Write, EOsclFileOp_Seek, EOsclFileOp_Tell, EOsclFileOp_Size, EOsclFileOp_Flush, EOsclFileOp_EndOfFile, EOsclFileOp_SetSize, EOsclFileOp_NativeOpen, EOsclFileOp_NativeClose, EOsclFileOp_NativeRead, EOsclFileOp_NativeWrite, EOsclFileOp_NativeSeek, EOsclFileOp_NativeTell, EOsclFileOp_NativeSize, EOsclFileOp_NativeFlush, EOsclFileOp_NativeEndOfFile, EOsclFileOp_NativeSetSize, EOsclFileOp_Last }
## Functions
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_getcwd (oscl_wchar *path, uint32 size)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_getcwd (char *path, uint32 size)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_stat (const oscl_wchar *path, OSCL_STAT_BUF *statbuf)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_stat (const char *path, OSCL_STAT_BUF *statbuf)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_mkdir (const oscl_wchar *path)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_mkdir (const char *path)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_rmdir (const oscl_wchar *path)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_rmdir (const char *path)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_chdir (const oscl_wchar *path)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_chdir (const char *path)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_rename (const oscl_wchar *oldpath, const oscl_wchar *newpath)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_rename (const char *oldpath, const char *newpath)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_statfs (OSCL_FSSTAT *stats, const char *path)
OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE | oscl_statfs (OSCL_FSSTAT *stats, const oscl_wchar *path)

## Define Documentation

#define OSCL_FILE_CHAR_PATH_DELIMITER _STRLIT_CHAR("/")

#define OSCL_FILE_STATS_LOGGER_NODE "OsclFileStats"

#define OSCL_FILE_WCHAR_PATH_DELIMITER _STRLIT("/")

#define OSCL_IO_EXTENSION_MAXLEN 512

#define OSCL_IO_FILENAME_MAXLEN 512

#define TOsclFileOffsetInt32 int32

## Typedef Documentation

typedef struct oscl_fsstat OSCL_FSSTAT

typedef struct oscl_stat_buf OSCL_STAT_BUF

typedef FILE* TOsclFileHandle

| TOsclFileHandle is an OS-native file handle type. With a class-based file API such as Symbian, a class ref is used as a file handle. For most ANSI-style file APIs, a file pointer is used as a file handle.

## Enumeration Type Documentation

enum OSCL_FILEMGMT_ERR_TYPE

  | Enumeration values:
  OSCL_FILEMGMT_E_OK |
  OSCL_FILEMGMT_E_PATH_TOO_LONG |
  OSCL_FILEMGMT_E_PATH_NOT_FOUND |
  OSCL_FILEMGMT_E_ALREADY_EXISTS |
  OSCL_FILEMGMT_E_NOT_EMPTY |
  OSCL_FILEMGMT_E_PERMISSION_DENIED |
  OSCL_FILEMGMT_E_NO_MATCH |
  OSCL_FILEMGMT_E_UNKNOWN |
  OSCL_FILEMGMT_E_SYS_SPECIFIC |
  OSCL_FILEMGMT_E_NOT_IMPLEMENTED |

enum OSCL_FILEMGMT_MODES

  | Enumeration values:
  OSCL_FILEMGMT_MODE_DIR |

enum OSCL_FILEMGMT_PERMS

  | Enumeration values:
  OSCL_FILEMGMT_PERMS_READ |
  OSCL_FILEMGMT_PERMS_WRITE |
  OSCL_FILEMGMT_PERMS_EXECUTE |

enum TOsclFileOp

  | Enumeration values:
  EOsclFileOp_Open |
  EOsclFileOp_Close |
  EOsclFileOp_Read |
  EOsclFileOp_Write |
  EOsclFileOp_Seek |
  EOsclFileOp_Tell |
  EOsclFileOp_Size |
  EOsclFileOp_Flush |
  EOsclFileOp_EndOfFile |
  EOsclFileOp_SetSize |
  EOsclFileOp_NativeOpen |
  EOsclFileOp_NativeClose |
  EOsclFileOp_NativeRead |
  EOsclFileOp_NativeWrite |
  EOsclFileOp_NativeSeek |
  EOsclFileOp_NativeTell |
  EOsclFileOp_NativeSize |
  EOsclFileOp_NativeFlush |
  EOsclFileOp_NativeEndOfFile |
  EOsclFileOp_NativeSetSize |
  EOsclFileOp_Last |

enum TPVDNSEvent

  | Enumeration values:
  EPVDNSSuccess |
  EPVDNSPending |
  EPVDNSTimeout |
  EPVDNSFailure |
  EPVDNSCancel |

enum TPVDNSFxn

  | Enumeration values:
  EPVDNSGetHostByName |

## Function Documentation

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_chdir | ( | const char * | path | ) |

  | oscl_chdir changes the current directory to the path given Parameters:
  character | path the full path of the directory to change to.
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_chdir | ( | const oscl_wchar * | path | ) |

  | oscl_chdir changes the current directory to the path given Parameters:
  wide | character path the full path of the directory to change to.
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_getcwd | ( | char * | path,
|  | uint32 | size
| ) |

  | oscl_getcwd function can be used to determine the full path name of the current directory. Parameters:
  pointer | to character buffer to receive the current directory
  size | size of buffer in characters
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_getcwd | ( | oscl_wchar * | path,
|  | uint32 | size
| ) |

  | oscl_getcwd function can be used to determine the full path name of the current directory. Parameters:
  pointer | to wide character buffer to receive the current directory
  size | size of buffer in wide characters
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_mkdir | ( | const char * | path | ) |

  | oscl_mkdir function creates a directory in the path given Parameters:
  character | path the full path of the directory to create. if parts of the path do not exist the function will fail
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_mkdir | ( | const oscl_wchar * | path | ) |

  | oscl_mkdir function creates a directory in the path given Parameters:
  wide | character path the full path of the directory to create. if parts of the path do not exist the function will fail
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_rename | ( | const char * | oldpath,
|  | const char * | newpath
| ) |

  | oscl_rmdir removes an empty directory in the path given Parameters:
  character | path the full path of the directory to remove.
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_rename | ( | const oscl_wchar * | oldpath,
|  | const oscl_wchar * | newpath
| ) |

  | oscl_rename function renames a file or directory Parameters:
  wide | character path the full path of the file or directory to rename.
  wide | character path the full path the new name for the directory
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_rmdir | ( | const char * | path | ) |

  | oscl_rmdir removes an empty directory in the path given Parameters:
  character | path the full path of the directory to remove.
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_rmdir | ( | const oscl_wchar * | path | ) |

  | oscl_rmdir function removes and empty directory in the path given Parameters:
  wide | character path the full path of the directory to remove.
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_stat | ( | const char * | path,
|  | OSCL_STAT_BUF * | statbuf
| ) |

  | oscl_stat function can be used to determine the attributes of a file in addition to whether the file exists or not Parameters:
  character | path the full path of the file to stat.
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_stat | ( | const oscl_wchar * | path,
|  | OSCL_STAT_BUF * | statbuf
| ) |

  | oscl_stat function can be used to determine the attributes of a file in addition to whether the file exists or not Parameters:
  wide | character path the full path of the file to stat.
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_statfs | ( | OSCL_FSSTAT * | stats,
|  | const oscl_wchar * | path
| ) |

  | Oscl_StatFS function populates a general structure describing free space available on a filesystem Parameters:
  stats | pointer to structure to hold information
  path | located in desired filesystem (utf8) Note: If the OS does not support a particular field in the structure, it is set to -1.
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.

OSCL_IMPORT_REF OSCL_FILEMGMT_ERR_TYPE oscl_statfs | ( | OSCL_FSSTAT * | stats,
|  | const char * | path
| ) |

  | Oscl_StatFS function populates a general structure describing free space available on a filesystem Parameters:
  stats | pointer to structure to hold information
  path | located in desired filesystem (utf8) Note: If the OS does not support a particular field in the structure, it is set to -1.
Returns: OSCL_FILEMGMT_ERR_TYPE, see enumeration for this type.