Documentation ¶
Index ¶
- func AtomicListConcat(list, seperator, atom engine.Term, k func(*engine.Env) *engine.Promise, ...) *engine.Promise
- func DowncaseAtom(atom, lowercase engine.Term, k func(*engine.Env) *engine.Promise, ...) *engine.Promise
- func IsList(t engine.Term, k func(*engine.Env) *engine.Promise, env *engine.Env) *engine.Promise
- func UpcaseAtom(atom, uppercase engine.Term, k func(*engine.Env) *engine.Promise, ...) *engine.Promise
- type FS
- func (ff FS) Consult(files engine.Term, k func(*engine.Env) *engine.Promise, env *engine.Env) *engine.Promise
- func (ff FS) DirectoryExists(directory engine.Term, k func(*engine.Env) *engine.Promise, env *engine.Env) *engine.Promise
- func (ff FS) DirectoryFiles(directory, files engine.Term, k func(*engine.Env) *engine.Promise, ...) *engine.Promise
- func (ff FS) FileExists(file engine.Term, k func(*engine.Env) *engine.Promise, env *engine.Env) *engine.Promise
- func (ff FS) Register()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtomicListConcat ¶ added in v0.0.8
func AtomicListConcat(list, seperator, atom engine.Term, k func(*engine.Env) *engine.Promise, env *engine.Env) *engine.Promise
AtomicListConcat (atomic_list_concat/3) succeeds if atom represents the members of list joined by seperator. This can be used to join strings by passing a ground list, or used to split strings by passing a ground atom.
atomic_list_concat(+List, +Seperator, -Atom). atomic_list_concat(-List, +Seperator, +Atom).
func DowncaseAtom ¶ added in v0.0.9
func DowncaseAtom(atom, lowercase engine.Term, k func(*engine.Env) *engine.Promise, env *engine.Env) *engine.Promise
DowncaseAtom (downcase_atom/2) converts atom into its lowercase equivalent.
downcase_atom(+Atom, -LowerCase).
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS provides native file system predicates. Non-ISO predicates are intended to maintain compatibility with Scryer Prolog's library(files). See: https://github.com/mthom/scryer-prolog/blob/master/src/lib/files.pl
func NewFS ¶
func NewFS(fsys fs.FS, i *prolog.Interpreter) FS
NewFS returns a collection of filesystem predicates tied to fsys and i.
func (FS) Consult ¶
func (ff FS) Consult(files engine.Term, k func(*engine.Env) *engine.Promise, env *engine.Env) *engine.Promise
Consult (consult/1) reads and executes the given file (if given an atom) or files (if given a list of atoms). ".pl" will be automatically appended to the file names when needed. Throws an error if files is not an atom or list of atoms.
consult(+FileOrList).
func (FS) DirectoryExists ¶ added in v0.0.4
func (ff FS) DirectoryExists(directory engine.Term, k func(*engine.Env) *engine.Promise, env *engine.Env) *engine.Promise
DirectoryExists (directory_exists/1) succeeds if a directory exists at the path given by the string directory. Throws an error if directory is not a string.
directory_exists(+Directory).
func (FS) DirectoryFiles ¶ added in v0.0.4
func (ff FS) DirectoryFiles(directory, files engine.Term, k func(*engine.Env) *engine.Promise, env *engine.Env) *engine.Promise
DirectoryFiles (directory_files/2) succeeds if files is a list of strings that contains all entries (including directories) of directory, which must be a string. This is useful for obtaining a list of files and directories. Throws an error if directory is not a string.
directory_files(+Directory, -Files).
func (FS) FileExists ¶ added in v0.0.4
func (ff FS) FileExists(file engine.Term, k func(*engine.Env) *engine.Promise, env *engine.Env) *engine.Promise
FileExists (file_exists/1) succeeds if a file exists at the path given by the string file. Throws an error if file is not a string.
file_exists(+File).
Directories ¶
Path | Synopsis |
---|---|
Package chars contains convenience functions for working with Prolog strings (list of characters).
|
Package chars contains convenience functions for working with Prolog strings (list of characters). |
Package taujson provides JSON-related Prolog predicates compatible with Tau Prolog's library(js).
|
Package taujson provides JSON-related Prolog predicates compatible with Tau Prolog's library(js). |