//===----------------------------------------------------------------------===//
#include "lldb/Host/android/HostInfoAndroid.h"
+#include "lldb/Host/FileSystem.h"
#include "lldb/Host/linux/HostInfoLinux.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
FileSpec file_candidate(path.str().c_str(), true);
file_candidate.AppendPathComponent(module_path.c_str());
- if (file_candidate.Exists())
+ if (FileSystem::Instance().Exists(file_candidate))
return file_candidate;
}
// algorithm will deduce /tmp, which is plain wrong. In that case we have an
// invalid directory, we substitute the path with /data/local/tmp, which is
// correct at least in some cases (i.e., when running as shell user).
- if (!success || !file_spec.Exists())
+ if (!success || !FileSystem::Instance().Exists(file_spec))
file_spec = FileSpec("/data/local/tmp", false);
- return file_spec.Exists();
+ return FileSystem::Instance().Exists(file_spec);
}
//
//===----------------------------------------------------------------------===//
-#include "lldb/Host/Config.h"
#include "lldb/Host/linux/HostInfoLinux.h"
+#include "lldb/Host/Config.h"
+#include "lldb/Host/FileSystem.h"
#include "lldb/Utility/Log.h"
#include "llvm/Support/Threading.h"
bool HostInfoLinux::ComputeSupportExeDirectory(FileSpec &file_spec) {
if (HostInfoPosix::ComputeSupportExeDirectory(file_spec) &&
- file_spec.IsAbsolute() && file_spec.Exists())
+ file_spec.IsAbsolute() && FileSystem::Instance().Exists(file_spec))
return true;
file_spec.GetDirectory() = GetProgramFileSpec().GetDirectory();
return !file_spec.GetDirectory().IsEmpty();
// C++ Includes
// Other libraries and framework includes
// Project includes
+#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Target/Process.h"
return error;
}
expand_tool_spec.AppendPathComponent("lldb-argdumper.exe");
- if (!expand_tool_spec.Exists()) {
+ if (!FileSystem::Instance().Exists(expand_tool_spec)) {
error.SetErrorString("could not find the lldb-argdumper tool");
return error;
}
// Other libraries and framework includes
#include "lldb/Core/PluginManager.h"
+#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/DynamicLoader.h"
// For now we are just making sure the file exists for a given module
ModuleSP exe_module_sp(target_sp->GetExecutableModule());
if (exe_module_sp.get())
- return exe_module_sp->GetFileSpec().Exists();
+ return FileSystem::Instance()::Exists(exe_module_sp->GetFileSpec());
// If there is no executable module, we return true since we might be
// preparing to attach.
return true;
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Section.h"
+#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostNativeProcessBase.h"
#include "lldb/Host/HostProcess.h"
#include "lldb/Host/windows/HostThreadWindows.h"
// For now we are just making sure the file exists for a given module
ModuleSP exe_module_sp(target_sp->GetExecutableModule());
if (exe_module_sp.get())
- return exe_module_sp->GetFileSpec().Exists();
+ return FileSystem::Instance().Exists(exe_module_sp->GetFileSpec());
// However, if there is no executable module, we return true since we might
// be preparing to attach.
return true;