예제 #1
0
void HFileOStream::Close( void )
  {
    if ( File != -1 ) {
      Flush();
      FIO_TRUNC( File,FIO_TELL(File) );
      FIO_CLOSE( File );
    }
    Reset();
}
예제 #2
0
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;
}
예제 #3
0
void HFileIStream::Close( void )
  {
    if ( File != -1 )
      FIO_CLOSE( File );
    Reset();
}