mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
More tidyups ... rem ove some previously deprecated methods and improve docs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21861 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0dd713a0dc
commit
c0f48a2720
5 changed files with 24 additions and 59 deletions
|
@ -3,6 +3,10 @@
|
|||
* Source/NSString.m: remove test method for path handling setup,
|
||||
add environment variable (at least for a while until we are even
|
||||
more sure that there are no problems with do-the-right-thing mode).
|
||||
Remove previously deprecated path methods.
|
||||
* Source/NSFileManager.m: remove previously deprecated path method.
|
||||
* Headers/Foundation/NSString.h: Add missing information about
|
||||
windows peculiarities to comments.
|
||||
* Source/NSUserDefaults.m: More tweaks to use windows registry.
|
||||
also remove test user default for path handling setup.
|
||||
* Source/win32/NSUserDefaultsWin32.m: Rewrite
|
||||
|
|
|
@ -216,11 +216,18 @@
|
|||
- (BOOL) fileExistsAtPath: (NSString*)path;
|
||||
- (BOOL) fileExistsAtPath: (NSString*)path isDirectory: (BOOL*)isDirectory;
|
||||
- (NSDictionary*) fileSystemAttributesAtPath: (NSString*)path;
|
||||
|
||||
/**
|
||||
* Convert from OpenStep internal string format to a string in
|
||||
* the local filesystem format, suitable for passing to system functions.<br />
|
||||
* This representation may vary between filesystems.<br />
|
||||
* On windows, the filesystem representation is 16-bit unicode and is expected
|
||||
* to be used in conjunction with the variants of system calls which work
|
||||
* with unicode strings.<br />
|
||||
* Raises an exception if the character conversion is not possible.
|
||||
*/
|
||||
- (const char*) fileSystemRepresentationWithPath: (NSString*)path;
|
||||
#ifndef NO_GNUSTEP
|
||||
- (NSString*) localFromOpenStepPath:(NSString*)path;
|
||||
- (NSString*) openStepPathFromLocal:(NSString*)localPath;
|
||||
#endif
|
||||
|
||||
- (BOOL) isExecutableFileAtPath: (NSString*)path;
|
||||
- (BOOL) isDeletableFileAtPath: (NSString*)path;
|
||||
- (BOOL) isReadableFileAtPath: (NSString*)path;
|
||||
|
|
|
@ -337,14 +337,20 @@ enum {
|
|||
* Converts the receiver to a C string path expressed in the character
|
||||
* encoding appropriate for the local host file system. This string will be
|
||||
* automatically freed soon after it is returned, so copy it if you need it
|
||||
* for long.
|
||||
* for long.<br />
|
||||
* NB. On ms-windows the filesystem representation of a path is a 16-bit
|
||||
* unicode character string, so you should only path the value returned by
|
||||
* this method to functions expecting wide characters.
|
||||
*/
|
||||
- (const char*) fileSystemRepresentation;
|
||||
|
||||
/**
|
||||
* Converts the receiver to a C string path using the character encoding
|
||||
* appropriate to the local file system. This string will be
|
||||
* stored into buffer if it is shorter than size, otherwise NO is returned.
|
||||
* appropriate to the local file system. This string will be stored
|
||||
* into buffer if it is shorter than size, otherwise NO is returned.<br />
|
||||
* NB. On ms-windows the filesystem representation of a path is a 16-bit
|
||||
* unicode character string, so the buffer you pass to this method must be
|
||||
* twice as long as the number of characters you expect to receive.
|
||||
*/
|
||||
- (BOOL) getFileSystemRepresentation: (char*)buffer
|
||||
maxLength: (unsigned int)size;
|
||||
|
|
|
@ -1884,15 +1884,6 @@ static NSStringEncoding defaultEncoding;
|
|||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert from OpenStep internal string format to a string in
|
||||
* the local filesystem format, suitable for passing to system functions.<br />
|
||||
* This representation could theoretically vary between filesystems.<br />
|
||||
* On windows, the filesystem representation is utf-16 and is expected to
|
||||
* be used in conjunction with the variants of system calls which work
|
||||
* with unicode strings.<br />
|
||||
* Raises an exception if the character conversion is not possible.
|
||||
*/
|
||||
- (const char*) fileSystemRepresentationWithPath: (NSString*)path
|
||||
{
|
||||
const _CHAR *c_path = 0;
|
||||
|
@ -1909,13 +1900,6 @@ static NSStringEncoding defaultEncoding;
|
|||
return (const char*)c_path;
|
||||
}
|
||||
|
||||
/** Deprecated */
|
||||
- (NSString*) localFromOpenStepPath: (NSString*)path
|
||||
{
|
||||
GSOnceMLog(@"deprecated");
|
||||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method converts from a local filesystem specific name
|
||||
* to an NSString object. Use it to convert a filename returned by
|
||||
|
@ -1934,13 +1918,6 @@ static NSStringEncoding defaultEncoding;
|
|||
#endif
|
||||
}
|
||||
|
||||
/** Deprecated */
|
||||
- (NSString*) openStepPathFromLocal: (NSString*)localPath
|
||||
{
|
||||
GSOnceMLog(@"deprecated");
|
||||
return localPath;
|
||||
}
|
||||
|
||||
@end /* NSFileManager */
|
||||
|
||||
/* A directory to enumerate. We keep a stack of the directories we
|
||||
|
|
|
@ -3479,35 +3479,6 @@ static NSFileManager *fm = nil;
|
|||
return [fm fileSystemRepresentationWithPath: self];
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts this string, which is assumed to be a path in Unix notation ('/'
|
||||
* is file separator, '.' is extension separator) to a string path expressed
|
||||
* in the convention for the host operating system.
|
||||
*/
|
||||
- (NSString*) localFromOpenStepPath
|
||||
{
|
||||
GSOnceMLog(@"deprecated");
|
||||
|
||||
if (fm == nil)
|
||||
{
|
||||
fm = RETAIN([NSFileManager defaultManager]);
|
||||
}
|
||||
|
||||
return [fm localFromOpenStepPath: self];
|
||||
}
|
||||
|
||||
- (NSString*) openStepPathFromLocal
|
||||
{
|
||||
GSOnceMLog(@"deprecated");
|
||||
|
||||
if (fm == nil)
|
||||
{
|
||||
fm = RETAIN([NSFileManager defaultManager]);
|
||||
}
|
||||
|
||||
return [fm openStepPathFromLocal: self];
|
||||
}
|
||||
|
||||
- (BOOL) getFileSystemRepresentation: (char*)buffer
|
||||
maxLength: (unsigned int)size
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue