Directory capacity
Rick Murray (539) 13840 posts |
Is there a simple API way to determine the maximum number of objects that may be in a directory? I’m not interested in RISC OS 5 limits, I’m specifically interested in detecting the presence of older format 77-object limits. |
Jon Abbott (1421) 2651 posts |
I seem to recall the number of heads is related to the directory structure, so possibly get the disc description and check that? |
Steffen Huber (91) 1953 posts |
I don’t think there is such an API. You just create objects until there is that dreaded “directory full” error. After all, there are formats out there that have different limits depending on the formatting parameters, or formats that only have a limit in the root directory, or…isn’t there also an old beeb format that only allowed 47 entries? |
Steffen Huber (91) 1953 posts |
IIRC, there are also limits in E+ format, but they somehow depend on filename lengths used inside the directory, so there is not “that one limit number” in new filecore world. |
Rick Murray (539) 13840 posts |
Is there any way, on modern hardware, to fake the directory limitations from before? HostFS won’t do it, so emulation is not an issue; and the modern formats as used on the Pi don’t do it either. |
Steve Pampling (1551) 8170 posts |
Think back to your Argonet user days and what the level of support for Internet access was on RO. |
Jon Abbott (1421) 2651 posts |
If you wanted to code something yourself, hook into FileV and return the appropriate error if the directory entry count exceeds your soft limit. |
Rick Murray (539) 13840 posts |
No, just wonder how !Manga would behave on 3.6/3.7 when the cache directory fills up. Not a big worry, as I doubt anybody is actually using such a setup. More of a “wonder what?” question. |
Jeffrey Lee (213) 6048 posts |
No need to fake it. Just run HForm and answer “no” when it asks if you want to use long filenames. Long filenames and >77 items per directory were both introduced at the same time as part of the new FileCore format. |