Extensions.File

From emotive
Jump to navigation Jump to search

Classification

Name File
Short Description Allows general read and write access to files
Class OTX Extension
Base Extension -
Pre-Conditions -
Specified by ISO 13209-3

Introduction

The File extension allows general read and write access to files. The extension allows files to be read or written in one of three modes:

  • Reading and writing the contents of a file as bytes.
  • Reading and writing the contents of a file as lines of text.
  • Reading and writing the entire file as a string.

The mode of access is determined by the first read or write operation performed on the file after it is opened. Once the mode is determined it cannot be changed and attempts to use other modes on the same open file will result in exceptions.

Actions for deleting files and directories are also included.

It is unspecified whether write actions will immediately influence the file system, or whether data will only be physically written when the SaveFile or CloseFile actions are called.

Actions

CloseFile
DeleteDirectory
DeleteFile
SaveFile
WriteBytes
WriteFile
WriteLine

Terms

CreateTempDirectory
GetFilePath
GetFilesFromDirectory
GetFileSize
IsDirectory
IsEndOfFileReached
IsFile
OpenFileForRead
OpenFileForWrite
ReadBytes
ReadFile
ReadLine

Data Types

FileHandle
FileReadHandle
FileWriteHandle

Exceptions

FileAccessException
FileException
FileFormatException
FileLockException
FileNotFoundException
FileOpenException
FileSaveException