Closed harshk95 closed 1 year ago
Not an obvious question -- this is something we didn't think of.
I haven't tried this out yet to confirm it works, but there is a way to set the temporary directory using the manifest file. In your APT directory, there is a file called Manifest.sample.txt
(https://github.com/kristinbranson/APT/blob/develop/Manifest.sample.txt)
If you copy this file over to a file called Manifest.txt
in the same directory, you can modify
/path/to/dl/cachedir
to be the path to a directory you would like to use.
By default, it is using a directory .apt
created within your home directory. I don't have a Windows machine right now to test things on, but can check that this code is working properly tonight. Here's the relevant code in APT.m, if it is helpful:
function cacheDir = getdlcacheroot()
m = APT.readManifest;
if isfield(m,'dltemproot')
cacheDir = m.dltemproot;
else
if ispc
userDir = winqueryreg('HKEY_CURRENT_USER',...
['Software\Microsoft\Windows\CurrentVersion\' ...
'Explorer\Shell Folders'],'Personal');
else
userDir = char(java.lang.System.getProperty('user.home'));
end
cacheDir = fullfile(userDir,'.apt');
end
end
I tested on Win and Linux and creating Manifest.txt
with the desired cache location works for me. Closing but please feel free to re-open with updates.
Hey, I had a little query. I have a working APT model on one PC and wish to transfer it to another PC to use. When I do this, a large temporary folder is made in a default location upon loading the project which then runs out of space resulting in the following error. The default folder has very limited space and I could not figure out how to change this.
Any pointers on how I could change the default temp directory would be helpful. Sorry, if there is something really silly that I am missing.