Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
Lochiel
Level 7

tmp:/ filesystem size?

Quick Question about the tmp:/ filesystem. How do I know how much space is left in it? Do I even need to worry about that, or will it be cleaned out automatically as I fill it?
0 Kudos
4 Replies
Roku Employee
Roku Employee

Re: tmp:/ filesystem size?

tmp:/ system space is variable depending on how many channels you have installed. If you are using the space, you will need to manage it while your app is running. When your app exits, the tmp:/ space is cleaned up.

- Joel
0 Kudos
Lochiel
Level 7

Re: tmp:/ filesystem size?

I guess I'm looking for guidance on how to manage it. My first thought was to check for available space before writing to it, but that doesn't appear to be an options. My current line of thinking, which I haven't had a chance to test, is to attempt to write, verify that the write worked, clear out space if it didn't, and then attempt to write again.
0 Kudos
Roku Employee
Roku Employee

Re: tmp:/ filesystem size?

How large a file are you thinking of writing? If you are writing images then just write them, and delete them when finished using them, or, use roTextureManager which should manage them for you.

- Joel
0 Kudos
Lochiel
Level 7

Re: tmp:/ filesystem size?

roTextureManager is exactly what I was looking for; I was trying to write my own version of this that probably would have been slow as heck and broken twice as often. Thank you.
0 Kudos