All Manuals > LispWorks® User Guide and Reference Manual > 16 Android interface

16.2 Directories on Android

On Android the temp directory that is used by default by open-temp-file and similar functions is the cacheDir of the application context. In principle the system can remove files from this directory when it needs disk space. The documentation for Android says that you should not rely too much on that, and avoid accumulating files in this directory.

LispWorks puts files with names starting with "lw" in this directory, so your code should avoid creating filenames starting with "lw".

get-folder-path can be used to find useful directories. :appdata for private directory, :documents for "user homedir" and :common-appdata for the external directory are the most useful keywords to pass. On Android get-folder-path can also be used to access the standard Android directories like the music and movies directories.

The function cl:user-homedir-pathname on Android returns the result of:

(sys:get-folder-path :documents)

LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:21