Base: Copy platform_file.* to files/file.*
This is just copying some files without adding them to any gyp
file. It looks like there is no value for git similarity that can
make https://codereview.chromium.org/82963004/ figure out where all
code comes from, so this CL is meant to provide the proper baseline.
BUG=322664
TBR=brettw@chromium.org
Review URL: https://codereview.chromium.org/93413002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237654 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 9ad009acc0ad30112b4e3c18a8ad66c518ee6b6b
diff --git a/base/files/file.cc b/base/files/file.cc
new file mode 100644
index 0000000..bb411b8
--- /dev/null
+++ b/base/files/file.cc
@@ -0,0 +1,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