File IO

Files are used to pass data to and from the PORTA binaries. The vertex representation is written to files with the .poi extension while the halfspace representation is written to files with the .ieq extension

For more details regarding the .poi and .ieq file formats, please refer to the PORTA General File Format docs.

Reading & Writing PORTA Files

XPORTA.read_poiFunction
read_poi( filepath::String ) :: POI{Rational{Int}}

Constructs a POI struct by parsing the provided .poi file. A DomainError is thrown if argument filepath does not end with the .poi extension.

source
XPORTA.read_ieqFunction
read_ieq( filepath::String ) :: IEQ{Rational{Int}}

Constructs an IEQ struct by parsing the provided .ieq file. A DomainError is thrown if argument filepath does not end with the .ieq extension.

source
XPORTA.write_poiFunction
write_poi(filename::String, poi::POI; dir::String="./") :: String

Writes a .poi file, dir/filename.poi, from the provided POI. If filename does not explicitly have the .poi extension, it will automatically be added. The method returns the complete file path for the created file, dir/filename.poi.

source
XPORTA.write_ieqFunction
write_ieq( filename::String, ieq::IEQ; dir::String="./") :: String

Writes an .ieq file, dir/filename.ieq, from the provided IEQ struct. If filename does not explicitly contain the .ieq extension, it will be added automatically. The method returns the complete file path for the created file, dir/filename.ieq.

source

Temp Files (Default Usage)

By default, XPORTA.jl will create the porta_tmp/ directory to which it will write all PORTA related files. At the end of computation, porta_tmp/ and all of its contents are deleted.

This functionality can be overridden by passing cleanup = false to the appropriate methods, e.g. traf.

XPORTA.make_porta_tmpFunction
make_porta_tmp( dir::String = "./") :: String

Creates the porta_tmp/ directory in directory dir and returns the porta_tmp path.

source
XPORTA.rm_porta_tmpFunction
rm_porta_tmp( dir::String = "./")

Recursively removes porta_tmp/ from directory dir.

Warning

This method uses rm("<dir/>porta_tmp/", force=true, recursive=true). Make sure not to delete important data.

source