1 //===-- FileSystem.cpp ------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "lldb/Host/FileSystem.h"
11 
12 #include "llvm/Support/FileSystem.h"
13 
14 #include <algorithm>
15 #include <fstream>
16 #include <vector>
17 
18 using namespace lldb;
19 using namespace lldb_private;
20 
21 llvm::sys::TimePoint<>
22 FileSystem::GetModificationTime(const FileSpec &file_spec) {
23   llvm::sys::fs::file_status status;
24   std::error_code ec = llvm::sys::fs::status(file_spec.GetPath(), status);
25   if (ec)
26     return llvm::sys::TimePoint<>();
27   return status.getLastModificationTime();
28 }
29