blob: f85527daeff790b3ce51efc3903294c0477a45ef [file] [log] [blame]
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include "ppapi/shared_impl/ppapi_shared_export.h"
namespace base {
class FilePath;
namespace ppapi {
// Routines to generate display names for internal and external file paths.
PPAPI_SHARED_EXPORT std::string GetNameForInternalFilePath(
const std::string& path);
PPAPI_SHARED_EXPORT std::string GetNameForExternalFilePath(
const base::FilePath& path);
// Determines whether an internal file path is valid.
PPAPI_SHARED_EXPORT bool IsValidInternalPath(const std::string& path);
// Determines whether an external file path is valid.
PPAPI_SHARED_EXPORT bool IsValidExternalPath(const base::FilePath& path);
// If path ends with a slash, normalize it away unless it's the root path.
PPAPI_SHARED_EXPORT void NormalizeInternalPath(std::string* path);
} // namespace ppapi