︙ | | | ︙ | |
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# endif
# if (defined(OF_HAVE_LINK) && !defined(OF_AMIGAOS)) || defined(OF_WINDOWS)
# define OF_FILE_MANAGER_SUPPORTS_LINKS
# endif
# if (defined(OF_HAVE_SYMLINK) && !defined(OF_AMIGAOS)) || defined(OF_WINDOWS)
# define OF_FILE_MANAGER_SUPPORTS_SYMLINKS
# endif
#endif
@class OFArray OF_GENERIC(ObjectType);
@class OFConstantString;
@class OFDate;
@class OFIRI;
@class OFString;
|
>
>
>
|
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# endif
# if (defined(OF_HAVE_LINK) && !defined(OF_AMIGAOS)) || defined(OF_WINDOWS)
# define OF_FILE_MANAGER_SUPPORTS_LINKS
# endif
# if (defined(OF_HAVE_SYMLINK) && !defined(OF_AMIGAOS)) || defined(OF_WINDOWS)
# define OF_FILE_MANAGER_SUPPORTS_SYMLINKS
# endif
# ifdef OF_LINUX
# define OF_FILE_MANAGER_SUPPORTS_EXTENDED_ATTRIBUTES
# endif
#endif
@class OFArray OF_GENERIC(ObjectType);
@class OFConstantString;
@class OFDate;
@class OFIRI;
@class OFString;
|
︙ | | | ︙ | |
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
* * @ref OFFileOwnerAccountName
* * @ref OFFileGroupOwnerAccountName
* * @ref OFFileLastAccessDate
* * @ref OFFileModificationDate
* * @ref OFFileStatusChangeDate
* * @ref OFFileCreationDate
* * @ref OFFileSymbolicLinkDestination
*
* Other IRI schemes might not have all keys and might have keys not listed.
*/
typedef OFConstantString *OFFileAttributeKey;
/**
* @brief The type of a file.
|
>
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
* * @ref OFFileOwnerAccountName
* * @ref OFFileGroupOwnerAccountName
* * @ref OFFileLastAccessDate
* * @ref OFFileModificationDate
* * @ref OFFileStatusChangeDate
* * @ref OFFileCreationDate
* * @ref OFFileSymbolicLinkDestination
* * @ref OFFileExtendedAttributesNames
*
* Other IRI schemes might not have all keys and might have keys not listed.
*/
typedef OFConstantString *OFFileAttributeKey;
/**
* @brief The type of a file.
|
︙ | | | ︙ | |
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
*
* For convenience, a category on @ref OFDictionary is provided to access this
* via @ref OFDictionary#fileCreationDate.
*/
extern const OFFileAttributeKey OFFileCreationDate;
/**
* @brief The destination of a symbolic link as an OFString.
*
* For convenience, a category on @ref OFDictionary is provided to access this
* via @ref OFDictionary#fileSymbolicLinkDestination.
*/
extern const OFFileAttributeKey OFFileSymbolicLinkDestination;
/**
* @brief A regular file.
*/
extern const OFFileAttributeType OFFileTypeRegular;
/**
* @brief A directory.
|
|
>
>
>
>
>
>
>
>
>
|
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
*
* For convenience, a category on @ref OFDictionary is provided to access this
* via @ref OFDictionary#fileCreationDate.
*/
extern const OFFileAttributeKey OFFileCreationDate;
/**
* @brief The destination of a symbolic link as an @ref OFString.
*
* For convenience, a category on @ref OFDictionary is provided to access this
* via @ref OFDictionary#fileSymbolicLinkDestination.
*/
extern const OFFileAttributeKey OFFileSymbolicLinkDestination;
/**
* @brief The names of the extended attributes as an @ref OFArray of
* @ref OFString.
*
* For convenience, a category on @ref OFDictionary is provided to access this
* via @ref OFDictionary#fileExtendedAttributesNames.
*/
extern const OFFileAttributeKey OFFileExtendedAttributesNames;
/**
* @brief A regular file.
*/
extern const OFFileAttributeType OFFileTypeRegular;
/**
* @brief A directory.
|
︙ | | | ︙ | |
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
|
* @brief Creates a symbolic link for an item.
*
* The destination IRI must have a full path, which means it must include the
* name of the item.
*
* This method is not available for all IRIs.
*
* @note On Windows, this requires at least Windows Vista and administrator
* privileges!
*
* @param IRI The IRI to the item which should symbolically link to the target
* @param target The target of the symbolic link
* @throw OFUnsupportedProtocolException No handler is registered for the IRI's
* scheme
*/
- (void)createSymbolicLinkAtIRI: (OFIRI *)IRI
withDestinationPath: (OFString *)target;
@end
@interface OFDictionary (FileAttributes)
/**
* @brief The @ref OFFileSize key from the dictionary.
*
* @throw OFUndefinedKeyException The key is missing
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
|
* @brief Creates a symbolic link for an item.
*
* The destination IRI must have a full path, which means it must include the
* name of the item.
*
* This method is not available for all IRIs.
*
* @note For file IRIs on Windows, this requires at least Windows Vista and
* administrator privileges!
*
* @param IRI The IRI to the item which should symbolically link to the target
* @param target The target of the symbolic link
* @throw OFOFCreateSymbolicLinkFailedException Creating a symbolic link failed
* @throw OFUnsupportedProtocolException No handler is registered for the IRI's
* scheme
*/
- (void)createSymbolicLinkAtIRI: (OFIRI *)IRI
withDestinationPath: (OFString *)target;
#ifdef OF_FILE_MANAGER_SUPPORTS_EXTENDED_ATTRIBUTES
/**
* @brief Returns the extended attribute with the specified name for the
* specified path.
*
* @param name The name of the extended attribute
* @param path The path of the item to return the extended attribute from
* @throw OFGetItemAttributesFailedException Getting the extended attribute
* failed
*/
- (OFData *)extendedAttributeForName: (OFString *)name
ofItemAtPath: (OFString *)path;
#endif
/**
* @brief Returns the extended attribute with the specified name for the
* specified IRI.
*
* This method is not available for all IRIs.
*
* @param name The name of the extended attribute
* @param IRI The IRI of the item to return the extended attribute from
* @throw OFGetItemAttributesFailedException Getting the extended attribute
* failed
* @throw OFUnsupportedProtocolException No handler is registered for the IRI's
* scheme
*/
- (OFData *)extendedAttributeForName: (OFString *)name
ofItemAtIRI: (OFIRI *)IRI;
@end
@interface OFDictionary (FileAttributes)
/**
* @brief The @ref OFFileSize key from the dictionary.
*
* @throw OFUndefinedKeyException The key is missing
|
︙ | | | ︙ | |
751
752
753
754
755
756
757
758
759
760
|
/**
* @brief The @ref OFFileSymbolicLinkDestination key from the dictionary.
*
* @throw OFUndefinedKeyException The key is missing
*/
@property (readonly, nonatomic) OFString *fileSymbolicLinkDestination;
@end
OF_ASSUME_NONNULL_END
|
>
>
>
>
>
>
>
>
|
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
|
/**
* @brief The @ref OFFileSymbolicLinkDestination key from the dictionary.
*
* @throw OFUndefinedKeyException The key is missing
*/
@property (readonly, nonatomic) OFString *fileSymbolicLinkDestination;
/**
* @brief The @ref OFFileExtendedAttributesNames key from the dictionary.
*
* @throw OFUndefinedKeyException The key is missing
*/
@property (readonly, nonatomic)
OFArray OF_GENERIC(OFString *) *fileExtendedAttributesNames;
@end
OF_ASSUME_NONNULL_END
|