Problems with Brick.FileSystem commands

HomeForumsMonoBrick Communication LibraryProblems with Brick.FileSystem commands


This topic contains 2 replies, has 2 voices, and was last updated by Author Image LittleBytesOfPi Corvallis, Oregon 1 year, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #5529

    Thank you for this awesome code you have shared. I am using it to build a C# program and teach the kids a bit about programming and robotics.

    Just about everything works great for me, except one thing. I can not get the file system commands to work. It ‘sort of’ works, but it does not get all the files on the system. It seems to find all the sub directories just fine, but it fails to properly get some or all of the files from each sub directory.

    I have tried two approaches: the Brick.Filesystem.GetFolderStructure function and writing my own recursive function using a call to Brick.FileSystem.GetFolderInfo( ). Neither one works without some defects?

    Also, of the files I do get, I am able to send command to start only one program; I can start the Demo.rpf that comes as the default program. However, my own programs (*.rbf) files do not play.

    Does anyone have advice about possible problems and solutions with using file system commands?

    Thank you


    Author Image

    Are there any spaces in the filenames that don’t work? Eg. ‘My program.rbf’ as opposed to ‘Myprogram.rbf’?

    I myself can’t seem to get the the Filesystem commands to recognize neither Name, Type or Path on files with spaces in them.. Or rather, it gets the filename correct, up until the first space. Type is ‘Unknown’, because it never gets to the .rbf part and path is wrong because of the incomplete file name.



    Thank you for your suggestion about spaces in file names. There were no spaces in my program names, but the sound files had spaces in them. I removed spaces, and things got better, but I still have problems using file system commands.

    I have set some breakpoints and watched the code. It appears that the string response is cut off. I searched around the code and noticed that certain read buffers have hard coded max size, maybe these buffers are not large enough.

    Also, I get different results when using USB or bluetooth to the brick. Neither method works 100%.

    To isolate the behavior from my implementation of the code, I put together a simple console app that just queries files (as per demo on this website). This gives same incomplete results when querying the file list

    I will keep digging, if anyone else has file system problems or knows how to fix this, your input is appreciated.

    Thank You

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Posted in

Make a donation