How do I know I run on a removable device ?

In another conversation, some text leads me to ask myself, and so here because I do not know the answer.

How do my application know it runs in a removable device ?
I mean Mobile application: in that case I may want to not place on the user’s boot hard disk preferences files, temporary files, etc. but beside the application in that case.

In FolderItem (Classic), I saw isWriteable * / isReadable, but these are not related (even if they can be useful).

Of course, I cannot do anything against files created by the running OS for my application.

  • The isWriteable example have a wrong Else report (MsgBox "The file cannot be read!")

Mac? Win? Linux?