Rewrite attribute handling code.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14454 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-09-16 11:30:22 +00:00
parent dbadb72311
commit 8256678919
4 changed files with 648 additions and 350 deletions

View file

@ -1,3 +1,11 @@
2002-09-16 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSFileManager.m: Basic/dummy implementations of new MacOS-X
methods added. Attribute handling totally rewritten to work in a lazy
way ... so we only set up attribute info in the dictionary when we
actually need it. Account 'Number' methods and dictionary keys changed
to be account 'ID' instead ... in accordance with MacOS-X usage.
2002-09-15 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSFileManager.m: MacOS-X ([componentsToDisplayForPath:]) and

View file

@ -130,14 +130,18 @@
@end /* NSDirectoryEnumerator */
/* File Attributes */
GS_EXPORT NSString* const NSFileAppendOnly;
GS_EXPORT NSString* const NSFileCreationDate;
GS_EXPORT NSString* const NSFileDeviceIdentifier;
GS_EXPORT NSString* const NSFileExtensionHidden;
GS_EXPORT NSString* const NSFileGroupOwnerAccountID;
GS_EXPORT NSString* const NSFileGroupOwnerAccountName;
GS_EXPORT NSString* const NSFileGroupOwnerAccountNumber;
GS_EXPORT NSString* const NSFileDeviceIdentifier;
GS_EXPORT NSString* const NSFileHFSCreatorCode;
GS_EXPORT NSString* const NSFileHFSTypeCode;
GS_EXPORT NSString* const NSFileImmutable;
GS_EXPORT NSString* const NSFileModificationDate;
GS_EXPORT NSString* const NSFileOwnerAccountID;
GS_EXPORT NSString* const NSFileOwnerAccountName;
GS_EXPORT NSString* const NSFileOwnerAccountNumber;
GS_EXPORT NSString* const NSFilePosixPermissions;
GS_EXPORT NSString* const NSFileReferenceCount;
GS_EXPORT NSString* const NSFileSize;
@ -166,19 +170,22 @@ GS_EXPORT NSString* const NSFileSystemFreeNodes;
/* Easy access to attributes in a dictionary */
@interface NSDictionary(NSFileAttributes)
- (NSDate*) fileCreationDate;
- (BOOL) fileExtensionHidden;
- (int) fileHFSCreatorCode;
- (int) fileHFSTypeCode;
- (BOOL) fileIsAppendOnly;
- (BOOL) fileIsImmutable;
- (unsigned long long) fileSize;
- (NSString*) fileType;
- (unsigned long) fileOwnerAccountID;
- (NSString*) fileOwnerAccountName;
- (unsigned long) fileGroupOwnerAccountID;
- (NSString*) fileGroupOwnerAccountName;
- (NSDate*) fileModificationDate;
- (unsigned long) filePosixPermissions;
- (unsigned long) fileSystemNumber;
- (unsigned long) fileSystemFileNumber;
#ifndef STRICT_MACOS_X
- (unsigned long) fileOwnerAccountNumber;
- (unsigned long) fileGroupOwnerAccountNumber;
#endif
@end
#endif

File diff suppressed because it is too large Load diff

View file

@ -516,7 +516,7 @@ AC_CHECK_HEADERS(sys/stat.h sys/vfs.h sys/statfs.h sys/statvfs.h pwd.h grp.h)
AC_CHECK_HEADERS(sys/mount.h sys/types.h windows.h locale.h langinfo.h)
saved_LIBS="$LIBS"
AC_CHECK_LIB(m, main)
AC_CHECK_FUNCS(statvfs symlink readlink geteuid getlogin getpwnam getpwuid rint)
AC_CHECK_FUNCS(statvfs symlink readlink geteuid getlogin getpwnam getpwuid getgrgid rint)
LIBS="$saved_LIBS"
#--------------------------------------------------------------------