meta data for this page
  •  

File Functions

The following file-handling functions are available in IBEBlock:

Function Description
ibec_DeleteFile Erases the file from the disk.
ibec_DirectoryExists Call ibec_DirectoryExists to determine whether the directory specified by the Name parameter exists.
ibec_SetCurrentDir
ibec_RemoveDirectory Removes a directory.
ibec_FileExists Tests if a specified file exists.
ibec_FileSize Returns the size of the specified file.
ibec_GetFiles Retrieves specified file or list of files.
ibec_LoadFromFile Loads file data into variable.
ibec_SaveToFile Saves value of variable into file.
ibec_CopyFile Copies an existing file to a new one.
ibec_MoveFile Renames an existing file or a directory (including all its children).
ibec_FileDateTime Returns the TIMESTAMP of a specified file.
ibec_SetFileDateTime
ibec_GetCurrentDir Returns the fully qualified name of the current directory.
ibec_GetRunDir Returns the path of the currently executing program (IBExpert.exe of IBEScript.exe.
ibec_ExtractFileDir Extracts the drive and directory parts from FileName.
ibec_ExtractFileName Extracts the name and extension parts of a file name.
ibec_FileAttr
ibec_SetFileAttr
ibec_RenameFile
ibec_ForceDirectories Creates 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:

Function Description
ibec_fs_CloseFile Closes the file opened with the ibec_fs_OpenFile function.
ibec_fs_Eof Closes the file opened with the ibec_fs_OpenFile function.
ibec_fs_OpenFile Opens a file for reading or writing.
ibec_fs_Position Returns the current offset into the stream for reading and writing.
ibec_fs_Readln Reads a line of text from a file.
ibec_fs_ReadString Reads count bytes from the file stream.
ibec_fs_Seek Resets the current position of the file stream.
ibec_fs_Size Returns the length, in bytes, of the file stream.
ibec_fs_SetSize
ibec_fs_Writeln
ibec_fs_WriteString Writes a srtring onto the file stream stream.
ibec_fs_ReadByte Reads one byte from the file stream and returns an unsigned integer value (0..255).
ibec_fs_WriteByte Writes one byte to the file stream as a 8-bit unsigned integer.
ibec_fs_ReadWord Reads two bytes from the file stream and returns an unsigned integer value (0..65535).
ibec_fs_WriteWord Writes two bytes to the file stream as a 16-bit unsigned integer.
ibec_fs_ReadDoubleWord Reads four bytes from the file stream and returns an unsigned integer value (0..4294967295).
ibec_fs_WriteDoubleWord Writes four bytes to the file stream as a 32-bit unsigned integer.
ibec_fs_ReadInt32 Reads four bytes from the file stream and returns a signed integer value (–2147483648..2147483647).
ibec_fs_WriteInt32 Writes four bytes to the file stream as a 32-bit signed integer.

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

Function Description
ibec_ini_Open Erases all data from the INI file in the memory.
ibec_ini_Close Frees the memory associated with the INI file object.
ibec_ini_ReadString Erases an entire section of an INI file.
ibec_ini_WriteString Saves the contents of the INI file to a variable.
ibec_ini_Clear Instantiates an INI file object.
ibec_ini_EraseSection Retrieves a string value from an INI file.
ibec_ini_UpdateFile Sets the contents of the INI file from a variable.
ibec_ini_SetStrings Flushes buffered INI file data to disk.
ibec_ini_GetStrings Writes 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.