ObjFW  Check-in [a7157045f1]

Overview
Comment:Add OFFileTypeUnknown
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a7157045f1836761ce3eb0fdf90e16ff00dbf2ff172fc962a098b3b736071c90
User & Date: js on 2021-04-29 23:42:32
Other Links: manifest | tags
Context
2021-04-29
23:46
ofhttp: Make GCC 5.3 happy again check-in: a50ae2cc3f user: js tags: trunk
23:42
Add OFFileTypeUnknown check-in: a7157045f1 user: js tags: trunk
23:30
Disable Clang's incorrect -Wdocumentation warning check-in: 026f74d7a7 user: js tags: trunk
Changes

Modified src/OFFileManager.h from [a969db1ae2] to [0757b002f6].

225
226
227
228
229
230
231









232
233
234
235
236
237
238
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247







+
+
+
+
+
+
+
+
+







 */
extern const OFFileAttributeType OFFileTypeBlockSpecial;

/**
 * @brief A socket.
 */
extern const OFFileAttributeType OFFileTypeSocket;

/**
 * @brief An unknown file type.
 *
 * This is different from not having an @ref OFFileType at all in that it means
 * that retrieving file types is supported, but the particular file type is
 * unknown.
 */
extern const OFFileAttributeType OFFileTypeUnknown;
#ifdef __cplusplus
}
#endif

/**
 * @class OFFileManager OFFileManager.h ObjFW/OFFileManager.h
 *

Modified src/OFFileManager.m from [d0ff19a328] to [de0d7b0760].

91
92
93
94
95
96
97

98
99
100
101
102
103
104
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105







+







const OFFileAttributeType OFFileTypeDirectory = @"OFFileTypeDirectory";
const OFFileAttributeType OFFileTypeSymbolicLink = @"OFFileTypeSymbolicLink";
const OFFileAttributeType OFFileTypeFIFO = @"OFFileTypeFIFO";
const OFFileAttributeType OFFileTypeCharacterSpecial =
    @"OFFileTypeCharacterSpecial";
const OFFileAttributeType OFFileTypeBlockSpecial = @"OFFileTypeBlockSpecial";
const OFFileAttributeType OFFileTypeSocket = @"OFFileTypeSocket";
const OFFileAttributeType OFFileTypeUnknown = @"OFFileTypeUnknown";

#ifdef OF_AMIGAOS4
# define CurrentDir(lock) SetCurrentDir(lock)
#endif

static OFFileManager *defaultManager;

Modified src/OFFileURLHandler.m from [451e6c48b2] to [b0e449d601].

384
385
386
387
388
389
390


391
392
393
394
395
396
397
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399







+
+







		[attributes setObject: OFFileTypeBlockSpecial
			       forKey: OFFileType];
#endif
#ifdef S_ISSOCK
	else if (S_ISSOCK(s->st_mode))
		[attributes setObject: OFFileTypeSocket forKey: OFFileType];
#endif
	else
		[attributes setObject: OFFileTypeUnknown forKey: OFFileType];
}

static void
setDateAttributes(OFMutableFileAttributes attributes, Stat *s)
{
	/* FIXME: We could be more precise on some OSes */
	[attributes