OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/common/platform_util.h" |
| 6 |
| 7 #include "base/file_path.h" |
| 8 #include "base/file_util.h" |
| 9 #include "base/process_util.h" |
| 10 |
| 11 namespace platform_util { |
| 12 |
| 13 // TODO(estade): It would be nice to be able to select the file in the file |
| 14 // manager, but that probably requires extending xdg-open. For now just |
| 15 // show the folder. |
| 16 void ShowItemInFolder(const FilePath& full_path) { |
| 17 FilePath dir = full_path.DirName(); |
| 18 if (!file_util::DirectoryExists(dir)) |
| 19 return; |
| 20 |
| 21 std::vector<std::string> argv; |
| 22 argv.push_back("xdg-open"); |
| 23 argv.push_back(dir.value()); |
| 24 base::file_handle_mapping_vector no_files; |
| 25 base::LaunchApp(argv, no_files, false, NULL); |
| 26 } |
| 27 |
| 28 } // namespace platform_util |
OLD | NEW |