Matlab Compiler: Is "userpath" always there and accessible?
7 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Steven Lord
2024-11-27
2 个评论
Steven Lord
2024-11-30
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!