void HFileOStream::Close( void ) { if ( File != -1 ) { Flush(); FIO_TRUNC( File,FIO_TELL(File) ); FIO_CLOSE( File ); } Reset(); }
DWORD MYRTLEXP FileLength( CONSTSTR fname ) { struct stat st; if ( !FIO_STAT( fname,&st ) ) return MAX_DWORD; #if defined(__QNX__) int file; DWORD sz; if ( S_ISLNK(st.st_mode) ) { int file = FIO_OPEN( fname,O_RDONLY ); if ( file == -1 ) return MAX_DWORD; sz = filelength( file ); FIO_CLOSE(file); return sz; } #endif return st.st_size; }
void HFileIStream::Close( void ) { if ( File != -1 ) FIO_CLOSE( File ); Reset(); }