summaryrefslogtreecommitdiffstats
path: root/base/platform_file.cc
blob: bb411b893fef5c97289db470416eade7eb6074a7 (plain)
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
// Copyright (c) 2011 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 "base/platform_file.h"

namespace base {

PlatformFileInfo::PlatformFileInfo()
    : size(0),
      is_directory(false),
      is_symbolic_link(false) {
}

PlatformFileInfo::~PlatformFileInfo() {}

#if !defined(OS_NACL)
PlatformFile CreatePlatformFile(const FilePath& name,
                                int flags,
                                bool* created,
                                PlatformFileError* error) {
  if (name.ReferencesParent()) {
    if (error)
      *error = PLATFORM_FILE_ERROR_ACCESS_DENIED;
    return kInvalidPlatformFileValue;
  }
  return CreatePlatformFileUnsafe(name, flags, created, error);
}
#endif

}  // namespace base