The SplFileObject class offers an object-oriented interface for a file.

See also:

Static variables

@:phpClassConststaticfinalread onlyDROP_NEW_LINE:Int

@:phpClassConststaticfinalread onlyREAD_AHEAD:Int

@:phpClassConststaticfinalread onlyREAD_CSV:Int

@:phpClassConststaticfinalread onlySKIP_EMPTY:Int

Constructor

@:value({ useIncludePath : false, mode : "r" })new(filename:String, mode:String = "r", useIncludePath:Bool = false, ?context:Resource)

Methods

@:value({ escape : "\\", enclosure : "\"", separator : "," })fgetcsv(separator:String = ",", enclosure:String = "\"", escape:String = "\\"):EitherType<NativeIndexedArray<String>, Bool>

fgetss(?allowable_tags:String):String

flock(operation:Int, ?wouldBlock:Ref<Int>):Bool

@:value({ escape : "\\", enclosure : "\"", separator : "," })fputcsv(fields:NativeIndexedArray<String>, separator:String = ",", enclosure:String = "\"", escape:String = "\\"):EitherType<Int, Bool>

fseek(offset:Int, ?whence:Int):Int

@:value({ length : 0 })fwrite(data:String, length:Int = 0):EitherType<Int, Bool>

seek(line:Int):Void

@:value({ escape : "\\", enclosure : "\"", separator : "," })setCsvControl(separator:String = ",", enclosure:String = "\"", escape:String = "\\"):Void