There are some scenarios in which you want to copy attributes from one file to another (for example, from within copyItem(atPath:toPath:). However currently, calling setAttributes(_:forItemAtPath:) with attributes retrieved from attributesForItem(atPath:) will throw because we can fetch .creationDate but we cannot set it (yet). Until this functionality is implemented in swift-foundation, we exclude .creationDate from the featureUnsupported check to ensure that applying attributes that Foundation provides will succeed.
This prevents throwing an error from copyItem calls made by SwiftPM when using the new re-cored Foundation
There are some scenarios in which you want to copy attributes from one file to another (for example, from within
copyItem(atPath:toPath:)
. However currently, callingsetAttributes(_:forItemAtPath:)
with attributes retrieved fromattributesForItem(atPath:)
willthrow
because we can fetch.creationDate
but we cannot set it (yet). Until this functionality is implemented in swift-foundation, we exclude.creationDate
from thefeatureUnsupported
check to ensure that applying attributes that Foundation provides will succeed.This prevents throwing an error from
copyItem
calls made by SwiftPM when using the new re-cored Foundation