]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/file.cpp
Implement get_handle in File and Pipe
[libs/core.git] / source / io / file.cpp
index cc3f0a9e4da52d40fc9893efb984801b1a09d672..862b607c9d00e08db7ce4e10bc2843ba1bd473ba 100644 (file)
@@ -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 &>(handle), 0, S_CUR);
 }
 
+const Handle &File::get_handle(Mode m)
+{
+       check_access(m);
+       return handle;
+}
+
 } // namespace IO
 } // namespace Msp