55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# import "OFMutex.h"
#endif
#import "OFCreateDirectoryFailedException.h"
#import "OFCreateSymbolicLinkFailedException.h"
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFLinkFailedException.h"
#import "OFMoveItemFailedException.h"
#import "OFNotImplementedException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFRemoveItemFailedException.h"
#import "OFRetrieveItemAttributesFailedException.h"
|
|
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# import "OFMutex.h"
#endif
#import "OFCreateDirectoryFailedException.h"
#import "OFCreateSymbolicLinkFailedException.h"
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFLinkItemFailedException.h"
#import "OFMoveItemFailedException.h"
#import "OFNotImplementedException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFRemoveItemFailedException.h"
#import "OFRetrieveItemAttributesFailedException.h"
|
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
|
destinationPath = destination.fileSystemRepresentation;
# ifndef OF_WINDOWS
OFStringEncoding encoding = [OFLocale encoding];
if (link([sourcePath cStringWithEncoding: encoding],
[destinationPath cStringWithEncoding: encoding]) != 0)
@throw [OFLinkFailedException
exceptionWithSourceURL: source
destinationURL: destination
errNo: errno];
# else
if (createHardLinkWFuncPtr == NULL)
@throw [OFNotImplementedException exceptionWithSelector: _cmd
object: self];
if (!createHardLinkWFuncPtr(destinationPath.UTF16String,
sourcePath.UTF16String, NULL))
@throw [OFLinkFailedException
exceptionWithSourceURL: source
destinationURL: destination
errNo: retrieveError()];
# endif
objc_autoreleasePoolPop(pool);
}
|
|
|
|
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
|
destinationPath = destination.fileSystemRepresentation;
# ifndef OF_WINDOWS
OFStringEncoding encoding = [OFLocale encoding];
if (link([sourcePath cStringWithEncoding: encoding],
[destinationPath cStringWithEncoding: encoding]) != 0)
@throw [OFLinkItemFailedException
exceptionWithSourceURL: source
destinationURL: destination
errNo: errno];
# else
if (createHardLinkWFuncPtr == NULL)
@throw [OFNotImplementedException exceptionWithSelector: _cmd
object: self];
if (!createHardLinkWFuncPtr(destinationPath.UTF16String,
sourcePath.UTF16String, NULL))
@throw [OFLinkItemFailedException
exceptionWithSourceURL: source
destinationURL: destination
errNo: retrieveError()];
# endif
objc_autoreleasePoolPop(pool);
}
|