93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
+
+
+
|
#else
typedef struct stat of_stat_t;
#endif
#ifndef S_ISLNK
# define S_ISLNK(s) 0
#endif
@interface OFFileManager_default: OFFileManager
@end
static OFFileManager *defaultManager;
#if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) && !defined(OF_MORPHOS)
static OFMutex *passwdMutex;
#endif
#if !defined(HAVE_READDIR_R) && defined(OF_HAVE_THREADS) && !defined(OF_WINDOWS)
|
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
|
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
-
+
|
#ifdef OF_WINDOWS
if ((module = LoadLibrary("kernel32.dll")) != NULL)
func_CreateSymbolicLinkW =
(WINAPI BOOLEAN (*)(LPCWSTR, LPCWSTR, DWORD))
GetProcAddress(module, "CreateSymbolicLinkW");
#endif
defaultManager = [[OFFileManager alloc] init];
defaultManager = [[OFFileManager_default alloc] init];
}
+ (OFFileManager *)defaultManager
{
return defaultManager;
}
|
1632
1633
1634
1635
1636
1637
1638
|
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
objc_autoreleasePoolPop(pool);
return [ret autorelease];
}
#endif
@end
@implementation OFFileManager_default
- (instancetype)autorelease
{
return self;
}
- (instancetype)retain
{
return self;
}
- (void)release
{
}
- (unsigned int)retainCount
{
return OF_RETAIN_COUNT_MAX;
}
@end
|