Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Read-entire-file/REALbasic/read-entire-file.basic
Normal file
11
Task/Read-entire-file/REALbasic/read-entire-file.basic
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Function readFile(theFile As FolderItem, txtEncode As TextEncoding = Nil) As String
|
||||
Dim fileContents As String
|
||||
Dim tis As TextInputStream
|
||||
tis = tis.Open(theFile)
|
||||
fileContents = tis.ReadAll(txtEncode)
|
||||
tis.Close
|
||||
Return fileContents
|
||||
|
||||
Exception err As NilObjectException
|
||||
MsgBox("File Not Found.")
|
||||
End Function
|
||||
Loading…
Add table
Add a link
Reference in a new issue