X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Ffile.cpp;h=862b607c9d00e08db7ce4e10bc2843ba1bd473ba;hp=cc3f0a9e4da52d40fc9893efb984801b1a09d672;hb=f041a31f9a6e19da86a63912e5a8050f216e5bc5;hpb=df5ab3d867c51d72344e443e3adb05bfa29a2b53 diff --git a/source/io/file.cpp b/source/io/file.cpp index cc3f0a9..862b607 100644 --- a/source/io/file.cpp +++ b/source/io/file.cpp @@ -88,7 +88,6 @@ File::~File() { signal_flush_required.emit(); sys_close(handle); - signal_closed.emit(); } void File::set_block(bool b) @@ -126,10 +125,7 @@ unsigned File::do_read(char *buf, unsigned size) unsigned ret = sys_read(handle, buf, size); if(ret==0) - { - eof_flag = true; - signal_end_of_file.emit(); - } + set_eof(); return ret; } @@ -157,5 +153,11 @@ SeekOffset File::tell() const return sys_seek(const_cast(handle), 0, S_CUR); } +const Handle &File::get_handle(Mode m) +{ + check_access(m); + return handle; +} + } // namespace IO } // namespace Msp