--- ../core/base/Headers/Foundation/NSPathUtilities.h.cvs 2004-01-17 12:42:01.000000000 +0800 +++ ../core/base/Headers/Foundation/NSPathUtilities.h 2004-01-19 13:43:39.000000000 +0800 @@ -20,7 +20,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. - AutogsdocSource: NSUser.m + AutogsdocSource: NSPathUtilities.m */ #ifndef __NSPathUtilities_h_GNUSTEP_BASE_INCLUDE @@ -34,15 +34,22 @@ * LOGNAME environment variable. Using it will almost certainly cause * trouble if the process does not posess the file access priviliges of the * new name. This is provided primarily for use by processes that run as - * system-manager and need to act as particular users. If uses the + * system-manager and need to act as particular users. It uses the * [NSUserDefaults +resetUserDefaults] extension to reset the defaults system * to use the defaults belonging to the new user. */ -GS_EXPORT void GSSetUserName(NSString *name); +GS_EXPORT void GSSetUserName(NSString *name); + +/** + * Try to locate file/directory (aName).(anExtension) in paths. + * Will return the first found or nil if nothing is found. + */ +GS_EXPORT NSString *GSFindNamedFile(NSArray *paths, NSString *aName, NSString *anExtension); GS_EXPORT NSString *GSDefaultsRootForUser(NSString *userName); -GS_EXPORT NSString *GSSystemRootDirectory(void); -GS_EXPORT NSArray *GSStandardPathPrefixes(void); + +//GS_EXPORT NSString *GSSystemRootDirectory(void); DEPRECATED +//GS_EXPORT NSArray *GSStandardPathPrefixes(void); DEPRECATED #endif GS_EXPORT NSString *NSUserName(void); GS_EXPORT NSString *NSHomeDirectory(void); @@ -61,9 +68,21 @@ NSDocumentationDirectory, NSAllApplicationsDirectory, NSAllLibrariesDirectory, + GSAppleReservedDirectory0, + GSAppleReservedDirectory1, + GSAppleReservedDirectory2, + GSAppleReservedDirectory3, + GSAppleReservedDirectory4, + GSAppleReservedDirectory5, + GSAppleReservedDirectory6, + GSAppleReservedDirectory7, + GSAppleReservedDirectory8, + GSAppleReservedDirectory9, GSLibrariesDirectory, GSToolsDirectory, GSApplicationSupportDirectory, + GSFrameworksDirectory, + GSFontsDirectory } NSSearchPathDirectory; typedef unsigned int NSSearchPathDomainMask; @@ -73,10 +92,10 @@ #define NSSystemDomainMask 0x00000008 #define NSAllDomainsMask 0xffffffff -GS_EXPORT NSArray *NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey, NSSearchPathDomainMask domainMask, BOOL expandTilde); +GS_EXPORT NSArray *NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey, NSSearchPathDomainMask domainMask, BOOL expandTilde); GS_EXPORT NSString *NSFullUserName(void); -GS_EXPORT NSArray *NSStandardApplicationPaths(void); -GS_EXPORT NSArray *NSStandardLibraryPaths(void); +GS_EXPORT NSArray *NSStandardApplicationPaths(void); +GS_EXPORT NSArray *NSStandardLibraryPaths(void); GS_EXPORT NSString *NSTemporaryDirectory(void); GS_EXPORT NSString *NSOpenStepRootDirectory(void); #endif /* !STRICT_OPENSTEP */