Changeset 11534


Ignore:
Timestamp:
07/22/11 08:50:56 (13 years ago)
Author:
tbretz
Message:
Changed GetFileSizeOnDisk to be static so it can be accessed from the outside.
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/DimWriteStatistics.cc

    r11318 r11534  
    7272//! @return the size of the file, in bytes
    7373//
    74 int64_t DimWriteStatistics::GetFileSizeOnDisk(const string& file)
     74int64_t DimWriteStatistics::GetFileSizeOnDisk(const string& file, MessageImp &log)
    7575{
    7676     errno = 0;
     
    8585     ostringstream str;
    8686     str << "stat() failed for '" << file << "': " << strerror(errno) << " [errno=" << errno << "]";
    87      fLog.Error(str);
     87     log.Error(str);
    8888
    8989     return -1;
  • trunk/FACT++/src/DimWriteStatistics.h

    r11518 r11534  
    5656
    5757    ///Returns the size on disk of a given file
    58     int64_t GetFileSizeOnDisk(const std::string& file);
     58    int64_t GetFileSizeOnDisk(const std::string& file) { return GetFileSizeOnDisk(file, fLog); }
    5959
    6060    int Write(const Time &t, const std::string &txt, int qos);
     
    7777    const Stats &GetTotalSizeWritten() const { return fStats; }
    7878    uint16_t GetUpdateInterval() const { return fUpdateInterval; }
     79
     80    ///Returns the size on disk of a given file
     81    static int64_t GetFileSizeOnDisk(const std::string& file, MessageImp &imp);
    7982};
    8083
Note: See TracChangeset for help on using the changeset viewer.