<< ibec_Power | IBEBlock | ibec_DeleteFile >>

File functions

The following file-handling functions are available in IBEBlock:

FunctionDescription
ibec_DeleteFileErases the file from the disk.
ibec_DirectoryExistsCall ibec_DirectoryExists to determine whether the directory specified by the Name parameter exists.
ibec_FileExistsTests if a specified file exists.
ibec_FileSizeReturns the size of the specified file.
ibec_GetFilesRetrieves specified file or list of files.
ibec_LoadFromFileLoads file data into variable.
ibec_SaveToFileSaves value of variable into file.
ibec_CopyFileCopies an existing file to a new one.
ibec_MoveFileRenames an existing file or a directory (including all its children).
ibec_FileDateTimeReturns the TIMESTAMP of a specified file.
ibec_GetCurrentDirReturns the fully qualified name of the current directory.
ibec_GetRunDirReturns the path of the currently executing program (IBExpert.exe of IBEScript.exe.
ibec_ExtractFileDirExtracts the drive and directory parts from FileName.
ibec_ExtractFileNameExtracts the name and extension parts of a file name.
ibec_ForceDirectoriesCreates all the directories along a directory path if they do not already exist.

The following functions are intended for working with files in stream mode:

FunctionDescription
ibec_fs_CloseFileCloses the file opened with the ibec_fs_OpenFile function.
ibec_fs_EofTests whether the file position is at the end of a file.
ibec_fs_OpenFileOpens a file for reading or writing.
ibec_fs_PositionReturns the current offset into the stream for reading and writing.
ibec_fs_ReadlnReads a line of text from a file.
ibec_fs_ReadStringReads count bytes from the file stream.
ibec_ini_SetStringsSets the contents of the INI file from a variable.
ibec_ini_GetStringsSaves the contents of the INI file to a variable.
ibec_fs_SeekResets the current position of the file stream.
ibec_fs_SizeReturns the length, in bytes, of the file stream.
ibec_fs_SetSize 
ibec_fs_Writeln 
ibec_fs_WriteStringWrites a srtring onto the file stream stream.
ibec_fs_ReadByteReads one byte from the file stream and returns an unsigned integer value (0..255).
ibec_fs_WriteByteWrites one byte to the file stream as a 8-bit unsigned integer.
ibec_fs_ReadWordReads two bytes from the file stream and returns an unsigned integer value (0..65535).
ibec_fs_WriteWordWrites two bytes to the file stream as a 16-bit unsigned integer.
ibec_fs_ReadDoubleWordReads four bytes from the file stream and returns an unsigned integer value (0..4294967295).
ibec_fs_WriteDoubleWordWrites four bytes to the file stream as a 32-bit unsigned integer.
ibec_fs_ReadInt32Reads four bytes from the file stream and returns a signed integer value (2147483648..2147483647).
ibec_fs_WriteInt32Writes four bytes to the file stream as a 32-bit signed integer.

The following functions were introduced to handle work with INI files:

FunctionDescription
ibec_ini_OpenInstantiates an INI file object.
ibec_ini_CloseFrees the memory associated with the INI file object.
ibec_ini_ClearErases all data from the INI file in the memory.
ibec_ini_UpdateFileFlushes buffered INI file data to disk.
ibec_ini_EraseSectionErases an entire section of an INI file.
ibec_ini_ReadStringRetrieves a string value from an INI file.
ibec_ini_WriteStringWrites a string value to an INI file.

Please note that all ibec_ini_xxx functions, except ibec_ini_ReadString and ibec_ini_Open, return NULL.

back to top of page
<< ibec_Power | IBEBlock | ibec_DeleteFile >>