Blame | Last modification | View Log | Download
VERSION 1.0 CLASSBEGINMultiUse = -1 'TruePersistable = 0 'NotPersistableDataBindingBehavior = 0 'vbNoneDataSourceBehavior = 0 'vbNoneMTSTransactionMode = 0 'NotAnMTSObjectENDAttribute VB_Name = "Opt"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = TrueAttribute VB_PredeclaredId = FalseAttribute VB_Exposed = FalseAttribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"Attribute VB_Ext_KEY = "Top_Level" ,"Yes"'#####################################################'# #'# OPT - Trida usnadnujici vstup a vystup do souboru #'# by Michal FrdlĂk 2005, verze 1.2 #'# #'#####################################################Public Function BasicInputFromFileToOneLine(ByRef Str, Path As String) As BooleanOn Error GoTo nfDim ofileofile = Pathwrap$ = Chr$(13) + Chr$(10)Open ofile For Input As #1Do Until EOF(1)Line Input #1, lineoftext$alltext$ = alltext$ & lineoftext$LoopStr = alltext$Close #1BasicInputFromFileToOneLine = TrueExit Functionnf: BasicInputFromFileToOneLine = FalseEnd FunctionPublic Function BasicInputFromFileToMultiLine(ByRef Str, Path As String) As BooleanOn Error GoTo nfDim ofileofile = Pathwrap$ = Chr$(13) + Chr$(10)Open ofile For Input As #1Do Until EOF(1)Line Input #1, lineoftext$alltext$ = alltext$ & lineoftext$ & wrap$LoopStr = alltext$Close #1BasicInputFromFileToMultiLine = TrueExit Functionnf: BasicInputFromFileToMultiLine = FalseEnd FunctionPublic Function BasicOutputToFile(Str, Path As String) As BooleanOn Error GoTo nfDim save$Dim hFile As Integersave = StrhFile = FreeFileOpen Path For Output As hFilePrint #hFile, saveClose hFileBasicOutputToFile = TrueExit Functionnf: BasicOutputToFile = FalseEnd Function