aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/util/filekit.cpp
blob: 4012ef00daee6900713d828c4683a151ee1663d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "filekit.h"
#include <vespa/vespalib/util/error.h>
#include <vespa/fastos/file.h>

#include <vespa/log/log.h>
LOG_SETUP(".filekit");

namespace search {

vespalib::system_time
FileKit::getModificationTime(const vespalib::string &name)
{
    FastOS_StatInfo statInfo;
    if (FastOS_File::Stat(name.c_str(), &statInfo)) {
        return statInfo._modifiedTime;
    }
    return vespalib::system_time();
}


}