Last change
on this file since 17 was
17,
checked in by zhangj, 10 years ago
|
To have a stable version on the server.
|
-
Property svn:executable set to
*
|
File size:
899 bytes
|
Line | |
---|
1 | function res = idSaveStruct(structToSave, fileNameCore, idName, dispData) |
---|
2 | % Before saving, this calls functions written by L.N. and performing the |
---|
3 | % file name decorations |
---|
4 | |
---|
5 | res = ''; |
---|
6 | % If the filename contains a directory then make sure it exists |
---|
7 | |
---|
8 | % Save the structure into a file, if necessary |
---|
9 | if strcmp(fileNameCore, '') ~= 0 |
---|
10 | % Claim error |
---|
11 | printf('File name is not specified'); |
---|
12 | end |
---|
13 | |
---|
14 | FileName = appendtimestamp(fileNameCore); |
---|
15 | %DirectoryName = getfamilydata('Directory','HU80_TEMPO'); |
---|
16 | DirectoryName = getfamilydata('Directory',idName); |
---|
17 | DirStart = pwd; |
---|
18 | [DirectoryName, ErrorFlag] = gotodirectory(DirectoryName); |
---|
19 | |
---|
20 | if ErrorFlag == 0 |
---|
21 | save(FileName,'-struct', 'structToSave'); |
---|
22 | res = FileName; |
---|
23 | else |
---|
24 | % Claim error |
---|
25 | errStr = strcat('Can not locate the directory ', DirectoryName); |
---|
26 | printf(errStr); |
---|
27 | end |
---|
28 | cd(DirStart); |
---|
29 | |
---|
30 | if dispData ~= 0 |
---|
31 | fprintf('Sauvegarde: %s\n', FileName); |
---|
32 | end |
---|
33 | |
---|
34 | |
---|
Note: See
TracBrowser
for help on using the repository browser.