File I/O Commands copyfile Returns R after copying file(s) or directories from src to dst. dlmwrite Writes the values of a 2D matrix, m, to the file, f. fclose Closes a file opened by fopen(). Requires the fileID returned by fopen as an argument. feof Returns 1 if an end-of-file symbol is encountered. ferror Display the error status of fileID. fflush Flush buffered output to fileID to be written the file. fgetl Reads the characters in a file until hitting the request_length of characters read. Reads until a new line or end of file is encountered. fgets Reads the characters in a file until hitting len of characters read, a new line or end of file if len is not provided. fileparts Returns the directory, name, and extension components of the file filepath. fopen Opens a file for reading. Returns an integer file ID to be used to for reference later. fprintf This function writes output to a file using the printf format_string capabilities. The first argument is a fileID returned from an earlier call to fopen. fread Reads the binary data of the precision type from the file fileID. frewind Moves the file pointer to the beginning of the file fileID. Returns 0 on success. fscanf Returns result R after reading a formatted data from file handle, f, specified by template t. fseek Sets the file pointer to a position in fileID. Returns 0 if successful; returns -1 if unsuccessful. ftell Returns the current position of the file pointer. fullfile Returns a filename from dir1...dirN and filename fname. fwrite Writes binary data to the file ID. imfinfo Gets information from the image, without reading pixel data, using functions defined in the omlimgtoolbox. importdata Returns result R after reading a file, f. Different reading mechanisms are used, based on the type of file, f. imread Reads an image with the pixel data stored in a matrix R, with functions defined in the omlimgtoolbox. imwrite Writes an image, whose pixel data comes from a matrix, m, with functions defined in the omlimgtoolbox. isdir Returns true if dir is a directory. ismac Returns true if the application is running on OSX. ispc Returns true if the application is running on a Windows operating system. isunix Returns true if the application is running on a Unix system. load Reads the content of a MAT file. omlfilename Returns the filename of the currently running script. pathsep Displays or sets the character used to separate directories in the path. printf Displays the string str to the Command window or Console prompt. pwd Returns the current working directory. rename Updates a file name from oldname to newname. Returns 0 if successful and non-zero otherwise. An optional output argument, errormessage, can be used to retrieve any additional system error messages on failure. save Save variables into a MAT file. SEEK_CUR Used in the fseek function to change the file position relative to the current file position. SEEK_END Used in the fseek function to change the file position relative to the end of the file. SEEK_SET Used in the fseek function to change the file position relative to the beginning of the file. stderr Returns the file ID corresponding to the error stream. stdin Returns the numeric file ID corresponding to the standard input stream of the application console mode. stdout Returns the numeric file ID corresponding to the standard output stream of the application console mode. textread Returns result R after reading a formatted data from a file, f, specified by an optional template, t. textscan Returns result R after reading formatted data from a file stream , f, or string, s.