ObjFW
 
Loading...
Searching...
No Matches
OFSetItemAttributesFailedException.h
1/*
2 * Copyright (c) 2008-2025 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License version 3.0 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * version 3.0 for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * version 3.0 along with this program. If not, see
17 * <https://www.gnu.org/licenses/>.
18 */
19
20#import "OFException.h"
21#import "OFIRIHandler.h"
22
23OF_ASSUME_NONNULL_BEGIN
24
25@class OFIRI;
26
34{
35 OFIRI *_IRI;
36 OFFileAttributes _attributes;
37 OFFileAttributeKey _failedAttribute;
38 int _errNo;
39 OF_RESERVE_IVARS(OFSetItemAttributesFailedException, 4)
40}
41
45@property (readonly, nonatomic) OFIRI *IRI;
46
50@property (readonly, nonatomic) int errNo;
51
55@property (readonly, nonatomic) OFFileAttributes attributes;
56
60@property (readonly, nonatomic) OFFileAttributeKey failedAttribute;
61
72+ (instancetype)exceptionWithIRI: (OFIRI *)IRI
73 attributes: (OFFileAttributes)attributes
74 failedAttribute: (OFFileAttributeKey)failedAttribute
75 errNo: (int)errNo;
76
77+ (instancetype)exception OF_UNAVAILABLE;
78
89- (instancetype)initWithIRI: (OFIRI *)IRI
90 attributes: (OFFileAttributes)attributes
91 failedAttribute: (OFFileAttributeKey)failedAttribute
92 errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
93
94- (instancetype)init OF_UNAVAILABLE;
95@end
96
97OF_ASSUME_NONNULL_END
OFConstantString * OFFileAttributeKey
A key for a file attribute in the file attributes dictionary.
Definition OFFileManager.h:77
OFDictionary * OFFileAttributes
A dictionary mapping keys of type OFFileAttributeKey to their attribute values.
Definition OFFileManager.h:101
The base class for all exceptions in ObjFW.
Definition OFException.h:157
instancetype exception()
Creates a new, autoreleased exception.
Definition OFException.m:283
A class for representing IRIs, URIs, URLs and URNs, for parsing them as well as accessing parts of th...
Definition OFIRI.h:41
instancetype init()
Initializes an already allocated object.
Definition OFObject.m:696
An exception indicating an item's attributes could not be set.
Definition OFSetItemAttributesFailedException.h:34
OFFileAttributeKey failedAttribute
The first attribute that could not be set.
Definition OFSetItemAttributesFailedException.h:60
OFIRI * IRI
The IRI of the item whose attributes could not be set.
Definition OFSetItemAttributesFailedException.h:45
int errNo
The errno of the error that occurred.
Definition OFSetItemAttributesFailedException.h:50
OFFileAttributes attributes
The attributes that should have been set.
Definition OFSetItemAttributesFailedException.h:55