Ignore:
Timestamp:
May 27, 2000, 4:14:21 AM (25 years ago)
Author:
bird
Message:

Corrected some bugs...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/common/kFile.cpp

    r3592 r3613  
    1 /* $Id: kFile.cpp,v 1.1 2000-05-23 18:23:05 bird Exp $
     1/* $Id: kFile.cpp,v 1.2 2000-05-27 02:14:20 bird Exp $
    22 *
    33 * kFile - Simple (for the time being) file class.
     
    4747
    4848
    49 
    5049/**
    5150 * Changes the real file position to match the virtual file position.
     
    7372    return TRUE;
    7473}
    75 
    7674
    7775
     
    116114        throw (rc);
    117115
    118     if (refreshFileStatus())
     116    if (!refreshFileStatus())
    119117        throw (rc);
    120118}
    121119
    122120
    123 
    124121/**
    125122 * Closes the file.
     
    129126    DosClose(hFile);
    130127}
    131 
    132128
    133129
     
    155151    return FALSE;
    156152}
    157 
    158153
    159154
     
    169164    return set(off) && read(pvBuffer, cbBuffer);
    170165}
    171 
    172166
    173167
     
    217211
    218212
    219 
    220213/**
    221214 * Seek relative to the current position.
     
    298291
    299292
    300 
    301293/**
    302294 * Get the size of the file.
     
    305297 * @remark      Will only throw error if refreshFileStatus failes.
    306298 */
    307 LONG            kFile::getSize()
     299long            kFile::getSize()
    308300{
    309301    if (!refreshFileStatus())
     
    313305}
    314306
     307
     308/**
     309 * Get current position.
     310 * @returns     The current file position.
     311 * @remark      Will only throw error if refreshFileStatus failes.
     312 */
     313long            kFile::getPos() const
     314{
     315    return offVirtual;
     316}
    315317
    316318
     
    334336
    335337
    336 
    337338/**
    338339 * Set error behaviour to fail by throwing the OS/2 return code when an
     
    367368 * @remark      Will never throw errors.
    368369 */
    369 int            kFile::getLastError()
     370int            kFile::getLastError() const
    370371{
    371372    return rc;
Note: See TracChangeset for help on using the changeset viewer.