Matlab Compiler: Is "userpath" always there and accessible?
34 views (last 30 days)
Show older comments
Dear all,
my compiled app needs to store some temporary files in the background. Is it safe to assume that the directory given by userpath will exist on all computers? And that we will always have write access to this folder?
Thanks!!
William
3 Comments
Answers (1)
Steven Lord
on 27 Nov 2024 at 15:48
2 Comments
Steven Lord
on 30 Nov 2024 at 21:06
It ought to return a folder name, unless perhaps a user has done something unusual with certain environmental variables. The documentation says that the folder is not guaranteed to exist, but you can check that with exist and use mkdir to create the directory if it does not exist yet.
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!