ForNeVeR / ForNeVeR/TruePath

Platform-specific methods (quoting etc.) for local paths

Offen
#3 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement help wanted
Vorherrschende Sprache
C#
Sterne
104
Forks
15
Ø Merge
9 Min.
Gemergte PRs (30 T.)
2

Beschreibung

First of all, there are some specific APIs for paths (say, `GetCompressedFileSize` on Windows, also Unix rights and Windows ACLs) which we may seek to implement.

Second: there are several absolutely different ways to convert paths to strings. For certain Windows APIs, it's important to handle these properly (i.e. quote paths, or append a UNC prefix where appropriate, see [Vacuum's `AbsolutePath`](https://github.com/ForNeVeR/Vacuum/blob/c16aab2b8b9e164d4889a17494160dbe315df2f0/Vacuum/AbsolutePath.fs#L49-L57) as inspiration).

Obviously, not all users want the platform-specific parts of the file path API, so we may include some separate platform-specific packages for all of this.

I imagine our users calling something like
```csharp
LocalPath fsp = …;
MyNativeFuncs.DoWinApiOperation(fsp.QuoteWinApi()); // QuoteWinApi is an extension
```

Or, say
```csharp
LocalPath fsp = …;
WindowsACL acl = fsp.GetAcl(); // an extension from Win package
UnixRights rights = fsp.GetUnixPermissions(); // an extension from Unix package
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.