1996-05-28 21:25:46 +00:00
|
|
|
/* Interface to file path utilities for GNUStep
|
|
|
|
Copyright (C) 1996 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Written by: Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
|
|
|
|
Created: May 1996
|
|
|
|
|
|
|
|
This file is part of the GNUstep Base Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; if not, write to the Free
|
1999-09-09 02:56:20 +00:00
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
1996-05-28 21:25:46 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __NSPathUtilities_h_GNUSTEP_BASE_INCLUDE
|
|
|
|
#define __NSPathUtilities_h_GNUSTEP_BASE_INCLUDE
|
|
|
|
|
|
|
|
#include <Foundation/NSString.h>
|
|
|
|
|
1999-02-20 21:19:15 +00:00
|
|
|
#ifndef NO_GNUSTEP
|
|
|
|
/*
|
|
|
|
* This extension permits a change of username from that specified in the
|
|
|
|
* 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
|
|
|
|
* [NSUserDefaults +resetUserDefaults] extension to reset the defaults system
|
|
|
|
* to use the defaults belonging to the new user.
|
|
|
|
*/
|
2000-06-14 04:03:56 +00:00
|
|
|
GS_EXPORT void GSSetUserName(NSString *name);
|
2001-10-14 02:49:10 +00:00
|
|
|
|
|
|
|
GS_EXPORT NSString *GSSystemRootDirectory(void);
|
|
|
|
GS_EXPORT NSArray *GSStandardPathPrefixes(void);
|
1999-02-20 21:19:15 +00:00
|
|
|
#endif
|
2000-06-14 04:03:56 +00:00
|
|
|
GS_EXPORT NSString *NSUserName();
|
|
|
|
GS_EXPORT NSString *NSHomeDirectory();
|
|
|
|
GS_EXPORT NSString *NSHomeDirectoryForUser(NSString *userName);
|
1998-12-15 19:11:58 +00:00
|
|
|
|
|
|
|
#ifndef STRICT_OPENSTEP
|
2000-03-25 10:59:07 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
NSApplicationDirectory,
|
|
|
|
NSDemoApplicationDirectory,
|
|
|
|
NSDeveloperApplicationDirectory,
|
|
|
|
NSAdminApplicationDirectory,
|
|
|
|
NSLibraryDirectory,
|
|
|
|
NSDeveloperDirectory,
|
|
|
|
NSUserDirectory,
|
|
|
|
NSDocumentationDirectory,
|
|
|
|
NSAllApplicationsDirectory,
|
2001-01-28 12:16:44 +00:00
|
|
|
NSAllLibrariesDirectory,
|
|
|
|
GSLibrariesDirectory,
|
2001-08-01 10:59:58 +00:00
|
|
|
GSToolsDirectory,
|
2000-03-25 10:59:07 +00:00
|
|
|
} NSSearchPathDirectory;
|
|
|
|
|
|
|
|
typedef unsigned int NSSearchPathDomainMask;
|
|
|
|
#define NSUserDomainMask 0x00000001
|
|
|
|
#define NSLocalDomainMask 0x00000002
|
|
|
|
#define NSNetworkDomainMask 0x00000004
|
|
|
|
#define NSSystemDomainMask 0x00000008
|
|
|
|
#define NSAllDomainsMask 0xffffffff
|
|
|
|
|
2000-06-14 04:03:56 +00:00
|
|
|
GS_EXPORT NSArray *NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, BOOL expandTilde);
|
|
|
|
GS_EXPORT NSString *NSFullUserName(void);
|
|
|
|
GS_EXPORT NSArray *NSStandardApplicationPaths(void);
|
|
|
|
GS_EXPORT NSArray *NSStandardLibraryPaths(void);
|
|
|
|
GS_EXPORT NSString *NSTemporaryDirectory(void);
|
|
|
|
GS_EXPORT NSString *NSOpenStepRootDirectory(void);
|
1998-12-15 19:11:58 +00:00
|
|
|
#endif /* !STRICT_OPENSTEP */
|
1996-05-28 21:25:46 +00:00
|
|
|
|
|
|
|
#endif /* __NSPathUtilities_h_GNUSTEP_BASE_INCLUDE */
|