Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: base/file_util_posix.cc

Issue 10916204: Remove FileEnumerator::IsLink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: replace IsLink in chromeos code Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_util.h" 5 #include "base/file_util.h"
6 6
7 #include <dirent.h> 7 #include <dirent.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <fnmatch.h> 10 #include <fnmatch.h>
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 memcpy(&(info->stat), &(cur_entry->stat), sizeof(info->stat)); 823 memcpy(&(info->stat), &(cur_entry->stat), sizeof(info->stat));
824 info->filename.assign(cur_entry->filename.value()); 824 info->filename.assign(cur_entry->filename.value());
825 } 825 }
826 826
827 // static 827 // static
828 bool FileEnumerator::IsDirectory(const FindInfo& info) { 828 bool FileEnumerator::IsDirectory(const FindInfo& info) {
829 return S_ISDIR(info.stat.st_mode); 829 return S_ISDIR(info.stat.st_mode);
830 } 830 }
831 831
832 // static 832 // static
833 bool FileEnumerator::IsLink(const FindInfo& info) {
834 return S_ISLNK(info.stat.st_mode);
835 }
836
837 // static
838 FilePath FileEnumerator::GetFilename(const FindInfo& find_info) { 833 FilePath FileEnumerator::GetFilename(const FindInfo& find_info) {
839 return FilePath(find_info.filename); 834 return FilePath(find_info.filename);
840 } 835 }
841 836
842 // static 837 // static
843 int64 FileEnumerator::GetFilesize(const FindInfo& find_info) { 838 int64 FileEnumerator::GetFilesize(const FindInfo& find_info) {
844 return find_info.stat.st_size; 839 return find_info.stat.st_size;
845 } 840 }
846 841
847 // static 842 // static
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 1152
1158 allowed_group_ids.insert(group_record->gr_gid); 1153 allowed_group_ids.insert(group_record->gr_gid);
1159 } 1154 }
1160 1155
1161 return VerifyPathControlledByUser( 1156 return VerifyPathControlledByUser(
1162 kFileSystemRoot, path, kRootUid, allowed_group_ids); 1157 kFileSystemRoot, path, kRootUid, allowed_group_ids);
1163 } 1158 }
1164 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 1159 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
1165 1160
1166 } // namespace file_util 1161 } // namespace file_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698