OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <windows.h> | 7 #include <windows.h> |
8 #include <propvarutil.h> | 8 #include <propvarutil.h> |
9 #include <psapi.h> | 9 #include <psapi.h> |
10 #include <shellapi.h> | 10 #include <shellapi.h> |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 } else { | 695 } else { |
696 LOG(WARNING) << "Failed to create directory " << full_path_str | 696 LOG(WARNING) << "Failed to create directory " << full_path_str |
697 << ", last error is " << error_code << "."; | 697 << ", last error is " << error_code << "."; |
698 return false; | 698 return false; |
699 } | 699 } |
700 } else { | 700 } else { |
701 return true; | 701 return true; |
702 } | 702 } |
703 } | 703 } |
704 | 704 |
| 705 // TODO(rkc): Work out if we want to handle NTFS junctions here or not, handle |
| 706 // them if we do decide to. |
| 707 bool IsLink(const FilePath& file_path) { |
| 708 return false; |
| 709 } |
| 710 |
705 bool GetFileInfo(const FilePath& file_path, base::PlatformFileInfo* results) { | 711 bool GetFileInfo(const FilePath& file_path, base::PlatformFileInfo* results) { |
706 base::ThreadRestrictions::AssertIOAllowed(); | 712 base::ThreadRestrictions::AssertIOAllowed(); |
707 | 713 |
708 WIN32_FILE_ATTRIBUTE_DATA attr; | 714 WIN32_FILE_ATTRIBUTE_DATA attr; |
709 if (!GetFileAttributesEx(file_path.value().c_str(), | 715 if (!GetFileAttributesEx(file_path.value().c_str(), |
710 GetFileExInfoStandard, &attr)) { | 716 GetFileExInfoStandard, &attr)) { |
711 return false; | 717 return false; |
712 } | 718 } |
713 | 719 |
714 ULARGE_INTEGER size; | 720 ULARGE_INTEGER size; |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 uint8 unused = *(touch + offset); | 1168 uint8 unused = *(touch + offset); |
1163 offset += step_size; | 1169 offset += step_size; |
1164 } | 1170 } |
1165 FreeLibrary(dll_module); | 1171 FreeLibrary(dll_module); |
1166 } | 1172 } |
1167 | 1173 |
1168 return true; | 1174 return true; |
1169 } | 1175 } |
1170 | 1176 |
1171 } // namespace file_util | 1177 } // namespace file_util |
OLD | NEW |