10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
* Alternatively, it may be distributed under the terms of the GNU General
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#include "config.h"
#import "OFApplication.h"
#import "OFDate.h"
#import "OFFileManager.h"
#import "OFLocale.h"
#import "OFNumber.h"
#import "OFSet.h"
#import "OFStdIOStream.h"
#import "OFString.h"
#import "LHAArchive.h"
#import "OFArc.h"
static OFArc *app;
static OFString *
indent(OFString *string)
{
return [string stringByReplacingOccurrencesOfString: @"\n"
|
>
>
>
>
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
* Alternatively, it may be distributed under the terms of the GNU General
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#include "config.h"
#include <errno.h>
#import "OFApplication.h"
#import "OFDate.h"
#import "OFFileManager.h"
#import "OFLocale.h"
#import "OFNumber.h"
#import "OFSet.h"
#import "OFStdIOStream.h"
#import "OFString.h"
#import "LHAArchive.h"
#import "OFArc.h"
#import "OFSetItemAttributesFailedException.h"
static OFArc *app;
static OFString *
indent(OFString *string)
{
return [string stringByReplacingOccurrencesOfString: @"\n"
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
static void
setModificationDate(OFString *path, OFLHAArchiveEntry *entry)
{
OFFileAttributes attributes = [OFDictionary
dictionaryWithObject: entry.modificationDate
forKey: OFFileModificationDate];
[[OFFileManager defaultManager] setAttributes: attributes
ofItemAtPath: path];
}
@implementation LHAArchive
+ (void)initialize
{
if (self == [LHAArchive class])
app = (OFArc *)[OFApplication sharedApplication].delegate;
|
>
|
|
>
>
>
>
|
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
static void
setModificationDate(OFString *path, OFLHAArchiveEntry *entry)
{
OFFileAttributes attributes = [OFDictionary
dictionaryWithObject: entry.modificationDate
forKey: OFFileModificationDate];
@try {
[[OFFileManager defaultManager] setAttributes: attributes
ofItemAtPath: path];
} @catch (OFSetItemAttributesFailedException *e) {
if (e.errNo != EISDIR)
@throw e;
}
}
@implementation LHAArchive
+ (void)initialize
{
if (self == [LHAArchive class])
app = (OFArc *)[OFApplication sharedApplication].delegate;
|