Used for POSIX and POSIX+XSI
Strategy details
|
ATerm
|
File-as-fd(Strategy s)
|
File
|
Proc.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Opens a file, applies the strategy s the file descriptor,and ensures that the file descriptor is closed on returnof s, regardless of outcome. The strategy s will be handed a file descriptor for the the FILE given toFile-as-fd. The result of s will become the resultof File-as-fd, and the file descriptor will always beclosed, also when s fails.
|
|
ATerm
|
xtc-close-fd
|
File
|
Proc.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Closes a file descriptor. This strategy can be used to closeany file opened by <tt>xtc-open-fd</tt>, and also thestandard files <tt>stdin</tt>, <tt>stdout</tt> and<tt>stderr</tt>.
|
|
ATerm
|
xtc-generate(Strategy tool)
|
File
|
Proc.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
Strategy
tool
|
tool _ -> name
|
|
Generates a new file using the component identified by tool. Thisstrategy will invoke the component given by tool with no arguments,and write the resulting term to a new file. A handle to the newfile will be returned. No arguments will be passed on to theinvoked component (except the implicit -o).
|
|
ATerm
|
xtc-io-transform(Strategy s)
|
File
|
Proc.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Transforms a file with an internal strategy s. This strategywill open an external file, apply s to it, and write theresult back to the file.
|
|
ATerm
|
xtc-io-transform-text(Strategy s)
|
File
|
Proc.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Transforms a file with an internal strategy s into a text file.This strategy will open an external file (which must be an ATerm),apply s to it, and print the result as a string back into thefile.
|
|
ATerm
|
xtc-new-file-name
|
File
|
Proc.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Generates a new file name, but does not create the file ondisk. As the file is not created on disk, another processmay theoretically create it (and thus own it), thus causinga race condition. For this reason, you may prefer to us<tt>xtc-new-file</tt> instead.
|
|
ATerm
|
xtc-open-fd
|
File
|
Proc.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Opens a file and returns a file descriptor. This strategycan be used to open any <tt>FILE</tt>s as well as<tt>stdin</tt>, <tt>stdout</tt> and <tt>stderr</tt>. Thefile descriptor should be closed with <tt>xtc-close-fd</tt>.
|
|
ATerm
|
xtc-transform(Strategy tool, Strategy args)
|
File
|
Proc.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
Strategy
tool
|
tool _ -> String
|
|
Invokes the XT component given by tool to transform the current term. The tool strategy must give the name of the component to invoke. TheThe current term will be serialized to the invoked component, and theresult of its execution will become the new current term. The argsparameter must return a list of arguments that will be given to theinvoked component.
|
|
ATerm
|
xtc-transform-file(Strategy tool)
|
File
|
Proc.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
Strategy
tool
|
tool _ -> n
|
|
Transforms an existing file with an external process into a new file.The resulting file will be created automatically, and a handle willbe returned by this strategy. The tool strategy must give the nameof the component to invoke. No arguments will be passed to thetransforming component.
|
|
Rule details
|
ATerm
|
read-from
|
File
|
Proc.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Reads a term from a file. If the given file exists, it will betreated as an ATerm and its content will be returned, as a term.
|
|
ATerm
|
xtc-generate(Strategy tool, Strategy args)
|
File
|
Proc.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
Strategy
tool
|
tool _ -> name
|
|
Generates a new file using the component identified by tool. Thisstrategy will invoke the component given by tool with no arguments,and write the resulting term to a new file. A handle to the newfile will be returned. The strategy args must produce a list ofarguments which are passed to the invoked component.
|
|
ATerm
|
xtc-transform-file(Strategy tool, Strategy args)
|
File
|
Proc.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
Strategy
tool
|
tool _ -> n
|
Strategy
args
|
args _ -> List(arg)
|
|
Transforms an existing file with an external process into a new file.The resulting file will be created automatically, and a handle willbe returned by this strategy.
The tool strategy must give the name of the component to invoke. Theargs strategy must give a list of arguments to pass to the component.
|
|