bugfix: fileBeg not set if create mode
This commit is contained in:
parent
4bd60a6929
commit
081a4104d9
|
|
@ -170,6 +170,11 @@ classdef ucf < handle
|
|||
if obj.fileID<0
|
||||
error('Unable to open file: %s',obj.File);
|
||||
end
|
||||
obj.fileBeg = ftell(obj.fileID);
|
||||
fseek(obj.fileID,0,'eof');
|
||||
obj.fileEnd = ftell(obj.fileID);
|
||||
fseek(obj.fileID,0,'bof');
|
||||
obj.FileSize = obj.fileEnd-obj.fileBeg;
|
||||
% Read the file header
|
||||
obj.readHeaderFile()
|
||||
% Scan through file to get the basic structure (steps/sets)
|
||||
|
|
@ -228,7 +233,9 @@ classdef ucf < handle
|
|||
if obj.fileID<0
|
||||
error('Unable to create file: %s',obj.File);
|
||||
end
|
||||
%
|
||||
obj.fileBeg = ftell(obj.fileID);
|
||||
obj.fileEnd = ftell(obj.fileID);
|
||||
obj.FileSize = obj.fileEnd-obj.fileBeg;
|
||||
switch par.Results.type
|
||||
case 'field'
|
||||
obj.typeID = obj.typeIDmatlabField;
|
||||
|
|
|
|||
Loading…
Reference in New Issue