Home Index classes Index static functions Index enumerations Index structure types

{Text_file|_CSharp}


CLASS {Text_file|_CSharp} , UNTESTED, STOPPING, NATIVE :



A class to load / save an array of strings to / from a text file. Static functions Text_load / Text_save allows to avoid creating an object instance but these use default encoding (or try to detect encoding automatically on input, which can not work for some encodings).


IMPORT : {System_functions} , {String_functions} , {File_path} .


STR Path|_to_text_file , INIT


{String_functions}.{encoding} Encoding


          

METHOD Load|_strings (
     
STR Lines|_to_APPEND_to [] ) ==> BOOL



FUN From_text_file (
     
STR Lines|_cleared_first [] ,
     
STR Path|_text_file ,
     
{encoding} Encoding )



FUN To_text_file (
     
STR Lines|_to_save [] ,
     
STR Path|_where ,
     
{encoding} Encoding )



FUN Text_load|_first_clear_lines (
     
STR Path|_file ,
     
STR Lines|_array [] )



FUN Load_text ( STR Lines|_array [] , STR Path|_from )



METHOD Save|_strings ( STR Lines|_to_save [] ) ==> BOOL



FUN Text_save ( STR Path|_file , STR Lines|_array [] )



FUN Save_to|_file ( STR Lines|_array [] , STR Path|_file )



FUN Unicode_save ( STR Path|_file , STR Lines|_array [] )



FUN Unix_text_save ( STR Path|_file , STR Lines|_array [] )


STR Line_end|ing_sequence


END