File system functions come in two forms. Older functions were written as two distinct functions names, only the prefix changed; Where fexists() operates on files in the secure data directory (often named mivadata) and sexists() operates on the web site directory (often called html or httpdocs).
Newer file systems functions contain an additional "location" parameter where location is either 'data' or 'script'. For example file_read( path, location, input_data var ). These functions are grouped together under Either Folder.
file_read_bytes( path, location, offset, length, data )
Reads a portion of the file specified by "path" and "location" into "data". Returns the number of bytes read, which may be less than "length", if an attempt was made to read past the end of the file, or -1 on error.
Returns the number of bytes read from the file. The file data is returned in "data".
path = The name or filepath of the file to open relative to the directory specified by "location"
location = One of "script" or "data"
offset = The zero-based offset at which to begin reading
length = The number of bytes to read. If < 0, the entire file after "offset" is read.
data = The variable in which to store the file data
Creates and locks a lockfile. Similar to the behavior of MvLOCKFILE without the closing /MvLOCKFILE behavior. It also creates the exact filename, rather than appending ".lck" to the filename as MvLOCKFILE does.
Returns 1 if sucessful, -1 if fails
path = fully qualified path to the file
location = location of the file - 'data' or 'script'
Use fdelete() or sdelete() to delete the lockfile.