📄 aft_save.m
字号:
function hfile = aft_Save(hfile)
% AnyFileType::Save - saves any BVQXfile object back to disk
%
% FORMAT: object.Save;
%
% No input / output fields.
% Version: v0.7b
% Build: 7082923
% Date: Aug-29 2007, 11:03 PM CEST
% Author: Jochen Weber, Brain Innovation, B.V., Maastricht, NL
% URL/Info: http://wiki.brainvoyager.com/BVQXtools
% only valid for single file
if nargin < 1 || ...
numel(hfile) ~= 1 || ...
~isBVQXfile(hfile, true)
error( ...
'BVQXfile:BadArgument', ...
'Invalid call to %s.', ...
mfilename ...
);
end
% get super-struct
sc = bvqxfile_getscont(hfile.L);
% check filename
if isempty(sc.F)
error( ...
'BVQXfile:BadFilename', ...
'File not yet saved. Use SaveAs method instead.' ...
);
end
% what to do
try
switch (lower(sc.S.FFTYPE))
case {'bff'}
sc.C = bffio(sc.F, sc.S, sc.C);
case {'tff'}
sc.C = tffio(sc.F, sc.S, sc.C);
otherwise
error( ...
'BVQXfile:InvalidFileType', ...
'Type not recognized (?FF): %s.', ...
sc.S.FFTYPE ...
);
end
catch
error( ...
'BVQXfile:ErrorSavingFile', ...
'Error saving file %s: %s.', ...
bf, lasterr ...
);
end
% set possibly changed content back
bvqxfile_setscont(hfile.L, sc);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -