-
Notifications
You must be signed in to change notification settings - Fork 125
Update LocalFS to use FileManager for all operations #565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci test |
837d965
to
3c1a8aa
Compare
@swift-ci test |
Sources/SWBUtil/FSProxy.swift
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you express this as return fileAttrs[.type] == FileAttributeType.typeRegular
to avoid the force cast?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get Cannot convert value of type '(any Sendable)?' to expected argument type 'FileAttributeType'
Sources/SWBUtil/FSProxy.swift
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the value be any Sendable & any Equatable
? I think that might allow simplifying:
return NSDictionary(dictionary: lhs.fileAttrs).isEqual(NSDictionary(dictionary: rhs.fileAttrs))
to
return lhs.fileAttrs == rhs.fileAttrs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, I have tried this, I get Type 'any Equatable & Sendable' cannot conform to
'Equatable'``. I'm not sure what Im missing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:(
3c1a8aa
to
7a522bd
Compare
@swift-ci test |
@swift-ci test linux |
@swift-ci test |
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break the build on FreeBSD (see inline comment)
7a522bd
to
1ee145d
Compare
@swift-ci test |
LocalFS was using some posix APIs (stat, mkdir, chmod, chown, etc) with some being used in Windows which mean long filenames would fail in some cases, this cleans that up making all platforms that same
1ee145d
to
427374a
Compare
@swift-ci test |
@swift-ci test linux |
@swift-ci test linux |
LocalFS was using some posix APIs (stat, mkdir, chmod, chown, etc) with some being used in Windows which mean long filenames would fail in some cases, this cleans that up making all platforms that same