beautypg.com

BrightSign BrightScript 2 Reference Guide User Manual

Page 36

background image

36

UpTime(dummy As Integer) As Float

Returns the uptime of the system since the last reboot.

RebootSystem() As Void

Causes a soft reboot.

ListDir(path As String) As Object

Returns a List object containing the contents of the directory path specified. All files
names are converted to all lowercase For example:

BrightScript> l=ListDir("/")
BrightScript> print l
test_movie_3.vob
test_movie_4.vob
test_movie_1.vob
test_movie_2.vob

ReadAsciiFile(filepath As String) As String

This function reads the specified file and returns it as a string. For example:

text=ReadAsciiFile(“/config.txt”)

WriteAsciiFile(filepath As String, buffer As String) As Boolean

This function reads the specified file and returns it as a string. For example:

WriteAsciiFile(“/config.txt”, “the text to write”)

CopyFile(source As String, destination As String) As Bool

Make a copy of a file.

MatchFiles(path As String, pattern_in As String) As Object

Search a directory for filenames that match a certain pattern. Pattern is a wildmat
expression. Returns a List object.

This function checks all the files in the directory specified against the
pattern specified and places any matches in the returned roList. The returned
list contains only the part of the filename that is matched against the pattern
not the full path.

The pattern may contain certain special characters:

A '?' matches any single character.