This project is read-only.

Remove these Path methods from AlphaFS?

Developer
Jan 20, 2014 at 7:38 AM
Edited Jan 20, 2014 at 2:34 PM
As of changeset: 106266 the following 11 methods are direct calls to
their System.IO.Path counterpart; should we remove these methods from the
AlphaFS library?

ChangeExtension
GetExtension
GetFileName
GetFileNameWithoutExtension
GetInvalidFileNameChars
GetInvalidPathChars
GetRandomFileName
GetTempFileName
GetTempPath
HasExtension
IsPathRooted


Please tell us what you think.

Regards,
Yomodo
Jan 20, 2014 at 11:46 PM
This would depend on the intent of the library: is it to operate as a complete replacement for System.IO (replace all instances of System.IO with Alphaleonis.Win32.Filesystem), or as a supplement (used only when long pathname specific items are required).

My view is that it should be a supplement rather than a replacement, perhaps documenting where and how System.IO fails with long paths, and encourage the use of as much of System.IO as possible. This should mean you have to track less API changes over time, etc.

It occurs to me that the different .NET versions probably have varying levels of support for long paths, meaning that a replacement be more predictable.

I'm more a sysadmin than a developer, so my grasp of what may be 'idiomatic' in these situations is a bit tenuous.
Jan 21, 2014 at 4:08 AM
The original intention is to be a direct replacement of System.IO in place, without the need of extra work for developers who need long path support. There are lot's of caveats, but I would stick with keeping all the methods for consistency. Sincerely,
Alexandr Normuradov
Marked as answer by Yomodo on 1/21/2014 at 4:24 PM