Did you know ... | Search Documentation: |
Getting file names |
The function PL_get_file_name() provides access to Prolog filenames and its file-search mechanism described with absolute_file_name/3. Its existence is motivated to realise a uniform interface to deal with file properties, search, naming conventions, etc., from foreign code.
BUF_STACK
, which is popped upon return from the
foreign predicate to Prolog. Conversion from the internal UNICODE
encoding is done using standard C library functions. flags is
a bit-mask controlling the conversion process. On failure, PL_FILE_NOERRORS
controls whether an exception is raised. Options are:
PL_FILE_ABSOLUTE
PL_FILE_OSPATH
\
is used to separate directories rather than
the canonical
/
.PL_FILE_SEARCH
PL_FILE_EXIST
PL_FILE_READ
PL_FILE_WRITE
PL_FILE_EXECUTE
PL_FILE_NOERRORS
PL_FILE_OSPATH
must be provided to fetch a
filename in OS native (e.g., C:\x\y
) notation.