<commit_before>//
//  GrowlPathUtilities.h
//  Growl
//
//  Created by <NAME> on 17.04.05.
//  Copyright 2005-2006 The Growl Project. All rights reserved.
//
// This file is under the BSD License, refer to License.txt for details

/*we can't typedef the enum, because then NSSearchPathDirectory constants
 *	cannot be used in GrowlSearchPathDirectory arguments/variables without a
 *	compiler warning (because NSSearchPathDirectory and GrowlSearchPathDirectory
 *	would then be different types).
 */
typedef int GrowlSearchPathDirectory;
enum {
	//Library/Application\ Support/Growl
	GrowlSupportDirectory = 0x10000,
	//all other directory constants refer to subdirectories of Growl Support.
	GrowlScreenshotsDirectory,
	GrowlTicketsDirectory,
	GrowlPluginsDirectory,
};
typedef NSSearchPathDomainMask GrowlSearchPathDomainMask; //consistency

@interface GrowlPathUtilities : NSObject {

}

#pragma mark Bundles

/*!	@method	growlPrefPaneBundle
 *	@abstract	Returns the Growl preference pane bundle.
 *	@discussion	Searches all installed preference pane for the Growl preference
 *	 pane.
 *	@result	The <code>NSBundle</code> for the Growl preference pane if it is
 *	 installed; <code>nil</code> otherwise.
 */
+ (NSBundle *) growlPrefPaneBundle;
/*!	@method	helperAppBundle
 *	@abstract	Returns the GrowlHelperApp bundle.
 *	@discussion	Searches inside the Growl preference pane, if it is installed,
 *	 for GrowlHelperApp.
 *	@result	The <code>NSBundle</code> for GrowlHelperApp if it is present;
 *	 <code>nil</code> otherwise.
 */
+ (NSBundle *) helperAppBundle;

#pragma mark Directories

/*!	@method	searchPathForDirectory:inDomains:mustBeWritable:
 *	@abstract	Returns an array of absolute paths to a given directory.
 *	@discussion	This method returns an array of all the directories of a given
 *	 type that exist (and, if <code>flag</code> is <code>YES</code>, are
 *	 writable). If no directories match this criteria, a valid (but empty)
 *	 array is returned.
 *
 *	 Unlike the <code>NSSearchPathForDirectoriesInDomains</code> function in
 *	 Foundation, this method does not allow you to specify whether tildes are
 *	 expanded: they will always be expanded.
 *	@result	An array of zero or more absolute paths.
 */
+ (NSArray *) searchPathForDirectory:(GrowlSearchPathDirectory) directory inDomains:(GrowlSearchPathDomainMask) domainMask mustBeWritable:(BOOL)flag;
/*!	@method	searchPathForDirectory:inDomains:
 *	@abstract	Returns an array of absolute paths to a given directory.
 *	@discussion	This method returns an array of all the directories of a given
 *	 type that exist. They need not be writable.
 *
 *	 Unlike the <code>NSSearchPathForDirectoriesInDomains</code> function in<commit_msg>Made +runningHelperAppBundle public, and documented it, and updated the documentation of +helperAppBundle and +growlPrefPaneBundle to note that they use it.<commit_after>//
//  GrowlPathUtilities.h
//  Growl
//
//  Created by <NAME> on 17.04.05.
//  Copyright 2005-2006 The Growl Project. All rights reserved.
//
// This file is under the BSD License, refer to License.txt for details

/*we can't typedef the enum, because then NSSearchPathDirectory constants
 *	cannot be used in GrowlSearchPathDirectory arguments/variables without a
 *	compiler warning (because NSSearchPathDirectory and GrowlSearchPathDirectory
 *	would then be different types).
 */
typedef int GrowlSearchPathDirectory;
enum {
	//Library/Application\ Support/Growl
	GrowlSupportDirectory = 0x10000,
	//all other directory constants refer to subdirectories of Growl Support.
	GrowlScreenshotsDirectory,
	GrowlTicketsDirectory,
	GrowlPluginsDirectory,
};
typedef NSSearchPathDomainMask GrowlSearchPathDomainMask; //consistency

@interface GrowlPathUtilities : NSObject {

}

#pragma mark Bundles

/*!	@method	growlPrefPaneBundle
 *	@abstract	Returns the Growl preference pane bundle.
 *	@discussion	First, attempts to retrieve the bundle for a running
 *	 GrowlHelperApp process using <code>runningHelperAppBundle</code>, and if
 *	 that was successful, returns the .prefpane bundle that contains it (if any).
 *	Then, if that failed, searches all installed preference panes for the Growl
 *	 preference pane.
 *	@result	The <code>NSBundle</code> for the Growl preference pane if it is
 *	 installed; <code>nil</code> otherwise.
 */
+ (NSBundle *) growlPrefPaneBundle;
/*!	@method	helperAppBundle
 *	@abstract	Returns the GrowlHelperApp bundle.
 *	@discussion	First, attempts to retrieve the bundle for a running
 *	 GrowlHelperApp process using <code>runningHelperAppBundle</code>, and
 *	 returns that if it was successful.
 *	Then, if it wasn't, searches for a Growl preference pane, and, if one is
 *	 installed, returns the GrowlHelperApp bundle inside it.
 *	@result	The <code>NSBundle</code> for GrowlHelperApp if it is present;
 *	 <code>nil</code> otherwise.
 */
+ (NSBundle *) helperAppBundle;

/*!	@method	runningHelperAppBundle
 *	@abstract	Returns the bundle for the running GrowlHelperApp process.
 *	@discussion	If GrowlHelperApp is running, returns an NSBundle for the .app 
 *	 bundle it was loaded from.
 *	If GrowlHelperApp is not running, returns <code>nil</code>.
 *	@result	The <code>NSBundle</code> for GrowlHelperApp if it is running;
 *	 <code>nil</code> otherwise.
 */
+ (NSBundle *) runningHelperAppBundle;

#pragma mark Directories

/*!	@method	searchPathForDirectory:inDomains:mustBeWritable:
 *	@abstract	Returns an array of absolute paths to a given directory.
 *	@discussion	This method returns an array of all the directories of a given
 *	 type that exist (and, if <code>flag</code> is <code>YES</code>, are
 *	 writable). If no directories match this criteria, a valid (but empty)
 *	 array is returned.
 *
 *	 Unlike the <code>NSSearchPathForDirectoriesInDomains</code> function in
 *	 Foundation, this method does not allow you to specify whether tildes are
 *	 expanded: they will always be expanded.
 *	@result	An array of zero or more absolute paths.
 */
+ (NSArray *) searchPathForDirectory:(GrowlSearchPathDirectory) directory inDomains:(GrowlSearchPathDomainMask) domainMask mustBeWritable:(BOOL)flag;
/*!	@method	searchPathForDirectory:inDomains:
 *	@abstract	Returns an array of absolute paths to a given directory.
 *	@discussion	This method returns an array of all the directories of a given
 *	 type that exist. They need not be writable.
 *
 *	 Unlike the <code>NSSearchPathForDirectoriesInDomains</code> function in
{'fraction_non_alphanumeric': 0.08174344656429347, 'fraction_numerical': 0.006204436171862882, 'mean_word_length': 4.788150807899461, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7038623', 'n_tokens_mistral': 1931, 'n_tokens_neox': 1849, 'n_words': 697}