forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfile_ref_util.h
35 lines (24 loc) · 1.08 KB
/
file_ref_util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// 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.
#ifndef PPAPI_SHARED_IMPL_FILE_REF_UTIL_H_
#define PPAPI_SHARED_IMPL_FILE_REF_UTIL_H_
#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
#endif // PPAPI_SHARED_IMPL_FILE_REF_UTIL_H_