Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
_Greg13
Reel Rookie

Error when using roFileSystem

Hello everyone, i'm trying to use the roFileSystem to use Stat() and Exists() command. i'm not using an roku device but an BrightSign XD1034 in firmware 8.2.

i know that not the good forum but i hope you can help me the script are BrightScript too and i didn't found an developers forum for BrightSign user ... 😞

I'm making an publing script usable with BrightAuthor and when i create my roFileSystem object and using it i have an error ... i'm trying in debugger mode (in SSH) and error  too :

 

bright filesys.PNG

   'Dot' Operator attempted with invalid BrightScript Component

Could you help me about this error please ?

Thanks, bye

0 Kudos
1 REPLY 1
necrotek
Roku Guru

Re: Error when using roFileSystem

Brightscript for brightsign and Roku diverged many years ago and components available in one may not be available in another. bright sign does not appear to have a 'roFilesystem' component.

I think 'Matchfiles' might be what you are looking for

ListDir(path As String) As Object
Returns an roList object containing the contents of the specified directory path. File names are converted to all lowercase.

MatchFiles(path As String, pattern_in As String) As Object
Takes a directory to look in (it can be as simple as "." or "/") and a pattern to be matched and then returns an roList containing the results. Each listed result contains only the part of the filename that is matched against the pattern, not the full path. The match is only applied in the specified directory; you will get no results if the pattern contains a directory separator. The pattern is a case insensitive wildcard expression. It may contain the following special characters:

? – Matches any single character.
* – Matches zero or more arbitrary characters.
[…] – Matches any single character specified within the brackets. The closing bracket is treated as a member of the character class if it immediately follows the opening bracket (i.e. "[]]" matches a single closed bracket). Within this class, "-" can be used to specify a range unless it is the first or last character (e.g. "[A-Cf-h"] is equivalent to "[ABCfgh]"). A character class may be negated by specifying "^" as the first character. To match a literal of this character, place it elsewhere in the class.

'roReadfile' may be useful

https://brightsign.atlassian.net/wiki/spaces/DOC/pages/370672986/File+Objects

 

you could also try reading in the xml and see if you get an error

rsp=CreateObject("roXMLElement")
rsp.Parse(ReadAsciiFile("example.xml"))

otherwise, ask in the brightsign community here

https://support.brightsign.biz/hc/en-us/community/topics

 

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.