IO
paket "IO";
The IO
package is used to work with files. It provides the File constructor.
File constructor
Use the file constructor to instantiate a Datoteka
object.
ƒ Datoteka(pathname: tekst) : objekat
- takes:
- pathname - a path to the file (either relative or absolute) (
tekst
)
- pathname - a path to the file (either relative or absolute) (
- returns:
Datoteka
object - special cases:
- Throws exception if pathname is not valid (for example, if the file cannot be found).
var fajl = Datoteka("test.txt"); var fajl2 = Datoteka("C:\\users\\boss\\examples\\test.txt");