chromium/third_party/pdfium/testing/utils/path_service.cpp

// Copyright 2015 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "testing/utils/path_service.h"

#include <stddef.h>

#ifdef _WIN32
#include <Windows.h>
#elif defined(__APPLE__)
#include <mach-o/dyld.h>
#include <sys/stat.h>
#else  // Linux
#include <linux/limits.h>
#include <sys/stat.h>
#include <unistd.h>
#endif  // _WIN32

#include <string>

#include "core/fxcrt/check.h"
#include "core/fxcrt/fx_system.h"

namespace {

#if defined(__APPLE__) || (defined(ANDROID) && __ANDROID_API__ < 21)
using stat_wrapper_t = struct stat;

int CallStat(const char* path, stat_wrapper_t* sb) {
  return stat(path, sb);
}
#elif !_WIN32
stat_wrapper_t;

int CallStat(const char* path, stat_wrapper_t* sb) {}
#endif

}  // namespace

// static
bool PathService::DirectoryExists(const std::string& path) {}

// static
bool PathService::EndsWithSeparator(const std::string& path) {}

// static
bool PathService::GetExecutableDir(std::string* path) {}

// static
bool PathService::GetSourceDir(std::string* path) {}

// static
bool PathService::GetTestDataDir(std::string* path) {}

// static
std::string PathService::GetTestFilePath(const std::string& file_name) {}

// static
bool PathService::GetThirdPartyFilePath(const std::string& file_name,
                                        std::string* path) {}