• incompetent@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    21 hours ago

    Did you post the wrong link? Yours is about “Maximum Path Length Limitation” and the number 128 doesn’t appear anywhere on that page. The max path length is 256 characters.

    Where did you read that “you can now have 128 files in your filesystem?”

    • enumerator4829@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      20 hours ago

      If you want to encode information into only the depth of your recursive identically named folders, you have 128 different depths, one character for the name, one for the slash, per level. Yields about 128 possible levels. Leave one off for the last filename, 127.

      If we want to name our folders something longer than a single character, we can store less files. If we want to store our files on linux, by default we get 4096 characters to play with, so about 2k levels (unless we compile our own linux kernel with PATH_MAX set for this very specific purpose). If we run CIFS we may be able to reach up to 16k levels.

      That was my interpretation of OPs (admittedly bad) idea. Personally, I try to avoid implementing inodes as Church numerals.