35 lines
		
	
	
	
		
			936 B
			
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
	
		
			936 B
			
		
	
	
	
		
			C++
		
	
	
	
	
	
// Copyright (c) 2013 GitHub, Inc.
 | 
						|
// Use of this source code is governed by the MIT license that can be
 | 
						|
// found in the LICENSE file.
 | 
						|
 | 
						|
#ifndef ATOM_COMMON_PLATFORM_UTIL_H_
 | 
						|
#define ATOM_COMMON_PLATFORM_UTIL_H_
 | 
						|
 | 
						|
class GURL;
 | 
						|
 | 
						|
namespace base {
 | 
						|
class FilePath;
 | 
						|
}
 | 
						|
 | 
						|
namespace platform_util {
 | 
						|
 | 
						|
// Show the given file in a file manager. If possible, select the file.
 | 
						|
// Must be called from the UI thread.
 | 
						|
void ShowItemInFolder(const base::FilePath& full_path);
 | 
						|
 | 
						|
// Open the given file in the desktop's default manner.
 | 
						|
// Must be called from the UI thread.
 | 
						|
void OpenItem(const base::FilePath& full_path);
 | 
						|
 | 
						|
// Open the given external protocol URL in the desktop's default manner.
 | 
						|
// (For example, mailto: URLs in the default mail user agent.)
 | 
						|
void OpenExternal(const GURL& url);
 | 
						|
 | 
						|
// Move a file to trash.
 | 
						|
bool MoveItemToTrash(const base::FilePath& full_path);
 | 
						|
 | 
						|
void Beep();
 | 
						|
 | 
						|
}  // namespace platform_util
 | 
						|
 | 
						|
#endif  // ATOM_COMMON_PLATFORM_UTIL_H_
 |