Filesystem¶
Include: Use System\FileSystem.pkg
The Filesystem reference covers sequential file input/output, file and directory management, path resolution, and advanced channel control.
Use Seq_New_Channel when opening files in application code; see Sequential Channels.
Opening and closing¶
- Direct_Input opens a file or directory for sequential input.
- Direct_Output creates or truncates a sequential output file.
- Append_Output appends sequential output to an existing file or creates a new file.
- Close_Input closes input.
- Close_Output closes output.
Reading and writing¶
- Read reads delimited values.
- Read_Line reads a line.
- Read_Hex reads hex-encoded text.
- Read_Block reads bytes into a string,
WString, orUChar[]. - Write writes text without a separator or line terminator.
- Write_Line writes text followed by the current line terminator.
- Write_Hex writes text as hex-encoded output.
- Write_Block writes bytes from a string or
UChar[]. - Flush_Output flushes buffered output.
File management¶
- File_Exist checks whether a path exists.
- Copy_File copies files or directory contents.
- Rename_File renames or moves files and directory contents.
- Erase_File deletes files.
- Get_File_Path returns the resolved path for a file.
- Get_File_Mod_Time returns a file or directory timestamp.
- Make_Temp_File creates a temporary file name.
- Valid_Drive checks whether a root or drive is valid.
- Make_Directory creates a directory.
- Remove_Directory removes a directory.
- Get_Current_Directory returns the current working folder.
- Set_Current_Directory sets the current working folder.
Path resolution¶
DFPATH explains DF_OPEN_PATH, the semicolon-separated open path used to resolve relative file names for the FILE driver.
Advanced channel details¶
Sequential Channels explains channel allocation, current input/output channels, position and size commands, and the no-channel close forms.