- Documentation
- Reference manual
- Packages
- SWI-Prolog C-library
- Memory files
- new_memory_file/1
- free_memory_file/1
- open_memory_file/3
- open_memory_file/4
- size_memory_file/2
- size_memory_file/3
- atom_to_memory_file/2
- insert_memory_file/3
- delete_memory_file/3
- memory_file_to_atom/2
- memory_file_to_atom/3
- memory_file_to_codes/2
- memory_file_to_codes/3
- memory_file_to_string/2
- memory_file_to_string/3
- memory_file_substring/5
- memory_file_line_position/4
- Memory files
- SWI-Prolog C-library
- encoding(+Encoding)
- Set the encoding for a memory file and the created stream. Encoding
names are the same as used with open/4.
By default, memoryfiles represent UTF-8 streams, making them capable of
storing arbitrary Unicode text. In practice the only alternative is
octet
, turning the memoryfile into binary mode. Please study SWI-Prolog Unicode and encoding issues before using this option. - free_on_close(+Bool)
- If
true
(defaultfalse
and the memory file is opened for reading, discard the file (see free_memory_file/1) if the input is closed. This is used to realise open_chars_stream/2 in library(charsio).