helper functions for working with files.
If file exists, populates properties. CZMQ supports portable symbolic
links, which are files with the extension ".ln". A symbolic link is a
text file containing one line, the filename of a target file. Reading
data from the symbolic link actually reads from the target file. Path
may be NULL, in which case it is not used.
Destroy a file item
Duplicate a file item, returns a newly constructed item. If the file
is null, or memory was exhausted, returns null.
Return file name, remove path if provided
Refresh file properties from disk; this is not done automatically
on access methods, otherwise it is not possible to compare directory
snapshots.
Return when the file was last modified. If you want this to reflect the
current situation, call zfile_restat before checking this property.
Return the last-known size of the file. If you want this to reflect the
current situation, call zfile_restat before checking this property.
Return true if the file is a directory. If you want this to reflect
any external changes, call zfile_restat before checking this property.
Return true if the file is a regular file. If you want this to reflect
any external changes, call zfile_restat before checking this property.
Return true if the file is readable by this process. If you want this to
reflect any external changes, call zfile_restat before checking this
property.
Return true if the file is writeable by this process. If you want this
to reflect any external changes, call zfile_restat before checking this
property.
Check if file has stopped changing and can be safely processed.
Updates the file statistics from disk at every call.
Return true if the file was changed on disk since the zfile_t object
was created, or the last zfile_restat() call made on it.
Remove the file from disk
Open file for reading
Returns 0 if OK, -1 if not found or not accessible
Open file for writing, creating directory if needed
File is created if necessary; chunks can be written to file at any
location. Returns 0 if OK, -1 if error.
Read chunk from file at specified position. If this was the last chunk,
sets the eof property. Returns a null chunk in case of error.
Returns true if zfile_read() just read the last chunk in the file.
Write chunk to file at specified position
Return 0 if OK, else -1
Read next line of text from file. Returns a pointer to the text line,
or NULL if there was nothing more to read from the file.
Close file, if open
Return file handle, if opened
Calculate SHA1 digest for file, using zdigest class.