6
jkuhl
5y

Why the FUCK does Dot Net have a file name limit of 260 characters?

Comments
  • 7
    I'm just curious, why would you need more?
  • 5
    @Stuxnet Because filenames can be longer? If a user wants to open a file with a longer name, and the program isn't able to handle that, it is not that great to explain that behaviour to users.
  • 0
    It is possible using the funny question mark character at the start of the whole path.
  • 7
    @Stuxnet because in the dot net world everything has long and verbose name spaces and then my company has their own naming conventions. This isn’t just the file name but the file name and it’s path together.

    When you have a dependency like Microsoft. Ridiculously.Verbose.Namespace.Telemetry.Techbabble.Systems.dll, it adds up quickly.

    Frankly the benefits of having descriptive namespaces in C# gets lost in the bloated verbosity.
  • 7
    I think WinAPI puts that limit on filename size. Don't remember why.
  • 0
    @sbiewald no shit file names can be longer. I personally have yet to encounter the need for such a long name, and therefore I was curious as to why a file name would need to be so big.

    @jkuhl ok that makes sense. Especially considering the path is included.
  • 1
    Why the fuck did you need to have a file like this?
  • 7
    There is no filename size limit. There is a file path size limit. They are limitations inherited from DOS. It's at the core of windows which they are rumored to rewrite
  • 1
    @orhun I should have said file path not file name
Add Comment