Path Contexts
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- csharp
- Lĩnh vực
- operating-systems
Hướng nghiên cứu
Không có tệp hoặc bài kiểm thử nào được nêu tên. Hãy bắt đầu bằng cách xác định các *Path types và LocalPath hiện có, sau đó lần theo các constructor và thao tác xử lý đường dẫn của chúng. Công việc được xem là hoàn tất khi các kiểu đó dùng chung một API ngữ cảnh đường dẫn hỗ trợ dấu phân cách, hành vi theo nền tảng, việc xác thực, các ngữ cảnh constructor tùy chỉnh và hành vi mặc định của LocalPathContext.Instance được mô tả trong TODO.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
We'll need a file system API for virtual paths. Local path (#1) should implement the same API, so it should be possible to abstract over both kinds of paths.
The API should allow to:
- manipulate foreign paths, e.g. Windows paths on a Linux computer, and vice versa;
- introduce fully virtual file systems.
Currently, I am thinking of adding a new field of type IFileSystem or IPathContext to each of our path types: hopefully, this won't create too much overhead for their storage.
Default constructors would rely on a singleton instance for the current system, something like new LocalPath("foo") => new LocalPath("foo", LocalFileSystem.Instance).
There should be a way for the user to introduce custom path validation in constructor. For example, if they want to somehow avoid Windows paths on Linux and want to throw on new LocalPath(CustomContext, @"C:\Windows"), even though this path is valid.
TODO
- Introduce a field into all
*Pathtypes. - Derive the path manipulation operations to the path context:
- path separators,
- behavior aspects such as Windows drives,
- path validation in constructors (even for
LocalPaththat doesn't do any validation otherwise).
- Allow passing the context to path constructors.
- The constructors should delegate to some
LocalPathContext.Instanceby default (if nothing else is passed). -
LocalPathContext.Instanceshould be a writable field (for global custom override). - Future enhancement request: allow
ThreadLocaland/orAsyncLocaloverride forLocalPathContext, to avoid reliance on the global state.
- Ngôn ngữ chính
- C#
- Star
- 104
- Fork
- 19
- Merge trung bình
- 13 giờ 42 phút
- Pull request đã merge (30 ngày)
- 9
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ForNeVeR/TruePath
-
enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
bug help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
-
Dependency Dashboard Đang mởdashboard
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 15/100
Tất cả issue của ForNeVeR/TruePath
Issue tương tự
-
bug frontend good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
unoplatform/uno#24629 ·
-
agentic-workflows Needs: Triage :mag: State: In-PR
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
CS0162 "Unreachable code detected" warning from a MSBuildTemp .tmp file in every game project Đang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Type: enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
apache/arrow-adbc#4809 ·