17 Commits

Author SHA1 Message Date
Saleem Abdulrasool
dbde80012d
(126089580) FoundationEssentials: repair FileManager.currentDirectoryPath on Win32
Use the Windows APIs properly to compute the current working directory.
Query the required storage before performing the allocation and then use
temporary storage to acquire a buffer. This repairs some of the build
errors encountered when building on Windows.
2024-04-08 17:20:23 -07:00
Saleem Abdulrasool
700fb4324d
FoundationEssentials: squelch some warnings (#525)
When trying to revive the Windows port, these warnings clutter the
current set of things to resolve still. Silence the warnings by
explicitly ignoring the results.
2024-04-03 13:14:12 -07:00
Saleem Abdulrasool
9491cce69c
FoundationEssentials: add some missing imports for Windows (#520)
This allows us to get further into building FoundationEssentials once
again on Windows. Much of the file system work has resulted in this
module no longer being viable on Windows and will need to be replaced to
allow building on Windows which does not have the `fts` APIs.
2024-03-29 14:19:23 -07:00
Jeremy Schonfeld
c9b00fa160
(123972921) _SearchPaths doesn't correctly mask invalid domains 2024-03-25 11:21:13 -07:00
Jeremy Schonfeld
c1e5321e8d
(125120887) attributesForItem(atPath:) uses FileAttributeType instead of String for .type value 2024-03-21 15:51:16 -07:00
Jeremy Schonfeld
e9a621c6ef
(124077456) FileManager should not crash on malformed modificationDate attribute value 2024-03-13 10:44:59 -07:00
Jeremy Schonfeld
52271156a6
(124134429) Correct macOS trash folder truncation 2024-03-08 14:13:24 -08:00
Jeremy Schonfeld
75f2ae99e4
(123713046) FileManager should always return values for immutable/appendOnly attributes
* (123713046) Ensure we always return values for immutable/appendOnly file attributes

* (123713046) Disable test on non-Darwin
2024-03-08 11:25:52 -08:00
Jeremy Schonfeld
e5211f2926
(122981400) Standardize on using internal import 2024-03-06 13:42:02 -08:00
Jeremy Schonfeld
0ada6ce7ad
(123258268) foundation_sysdir_start_search_path_enumeration shouldn't crash with extra option bits set 2024-02-28 22:25:05 -08:00
Jeremy Schonfeld
beeea05206
(123438249) FileManager.removeItem does not throw error when encountering long paths
* (123438249) FileManager.removeItem does not throw error when encoutering long paths

The change makes swift-foundation FileManager.removeItem properly throw
on removefile(3) errors.

* Conform POSIXError to Error

* Clean up warnings and produce more detailed test failures

* Fix macOS CI failure
2024-02-28 13:33:55 -08:00
Jeremy Schonfeld
e5adda1335
(123322354) _FileManagerImpl.createDirectory(at:withIntermediateDirectories:attributes:) calls to self instead of referenced fileManager 2024-02-21 10:01:49 -08:00
Jeremy Schonfeld
5b06c5d5ac
(123102499) FileManager's setAttributes:forItemAtPath: is unnecessarily slow
* (123102499) Swift implementation of setAttributes:forItemAtPath: is slower than the old ObjC implementation

* Move relevant key list to static array

* Fix build failure
2024-02-20 11:46:54 -08:00
Jeremy Schonfeld
12d6069721
(123104044) Consolidate/standardize file-based error reporting
* Consolidate/standardize file-based error reporting

* Fix build failures

* Fix test failures
2024-02-16 16:50:16 -08:00
Jeremy Schonfeld
f28d05ad9d
(122854809) Fix error handling for reading extended attributes 2024-02-13 18:55:36 -08:00
Jeremy Schonfeld
f99560eea6
(122800483) Add missing FOUNDATION_FRAMEWORK import for file protection classes 2024-02-12 10:37:52 -08:00
Jeremy Schonfeld
33856a556d
(120741818) Port FileManager to swift-foundation
* (120741818) Port FileManager to swift-foundation

* (120741818) Fix linux test failures

* (120741818) Fix build failures
2024-02-09 15:03:43 -08:00