blob: 04f15635860a1cd79d251afc3e0c26753b2bebef (
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 Vespa.ai. 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();
}
}
|