tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
11
Task/Read-entire-file/REALbasic/read-entire-file.realbasic
Normal file
11
Task/Read-entire-file/REALbasic/read-entire-file.realbasic
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