-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implemented FileManager.attributesOfFileSystem() #1250
Conversation
@swift-ci please test |
There seems to be a build error reported:
|
I've forked code for Linux now. We have to use |
Swift's Glibc doesn't import |
@swift-ci please test |
1 similar comment
@swift-ci please 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.
Please fix test failure by changing the systemNumber to a non-zero uint64.
TestFoundation/TestFileManager.swift
Outdated
|
||
let systemNumber = attrs[.systemNumber] as? NSNumber | ||
XCTAssertNotNil(systemNumber) | ||
XCTAssertGreaterThan(systemNumber!.int64Value, 0) |
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.
Test failures reported:
TestFoundation/TestFileManager.swift:221: error: TestFileManager.test_fileSystemAttributes : XCTAssertGreaterThan failed: ("-4983562779004283539") is not greater than ("0") -
Given that the data is being parsed with a UInt64 in the implementation, it's not clear why this is using an Int64 in its test. Of course, if it is an UInt64 then the greaterThan 0 is basically the same as != 0, so that would be a couple of changes to fix.
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.
You are right I'll do
Squashed commits: [55e5c50] Fallback to statvfs in Linux for filesystem attributes
…wift-corelibs-foundation into filemgr/fsattributes
@swift-ci please test |
@swift-ci please test and merge |
This is reopening of #888 PR. Please read conversation there.