Have there actually been any commercial operating systems with a single-level, limited capacity file directory? I remember vaguely that the early versions of MS-DOS FAT12 may have had a single layer, but I could not find any references.
The whole CP/M family of operating systems, until Concurrent DOS, had both a limited number of files per drive and no hierarchy except for user areas. From the Wikipedia article:
CP/M 2.2 had no subdirectories in the file structure, but provided 16 numbered user areas to organize files on a disk. To change user one had to simply type "User X" at the command prompt, X being the number of the user wanted; security was non-existent and not believed to be necessary. The user area concept was to make the single-user version of CP/M somewhat compatible with multi-user MP/M systems. A common patch for the CP/M and derivative operating systems was to make one user area accessible to the user independent of the currently set user area. A USER command allowed the user area to be changed to any area from 0 to 15. User 0 was the default. If one changed to another user, such as USER 1, the material saved on the disk for this user would only be available to USER 1; USER 2 would not be able to see it or access it. However, files stored in the USER 0 area were accessible to all other users; their location was specified with a prefatory path, since the files of USER 0 were only visible to someone logged in as USER 0. The user area feature arguably had little utility on small floppy disks, but it was useful for organizing files on machines with hard drives. The intent of the feature was to ease use of the same computer for different tasks. For example, a secretary could do data entry, then, after switching USER areas, another employee could use the machine to do billing without their files intermixing.
As far as the number of files, that was not much of a problem on floppy disks, but a big problem on hard drives. I remember patching MP/M-86 on an Altos 586-20 to increase the number from (if I remember correctly) 1,024 to 2,048 files. That was a bit risky, since I didn't know all the internals of MP/M-86, but in the end a few small changes and reassembly of those files, and backup/restore of the hard drive, and I had a system that lasted me quite a bit longer than it would have otherwise.
With Concurrent DOS, the CP/M family (at that point CP/M had gone from CP/M-86 (16-bit) to Concurrent CP/M and MP/M-86 (multiuser/multitasking) and then added MS-DOS compatibility) added full MS-DOS hierarchical directories. Once you have hierarchical directories, the number of files in the root directory is still limited in some systems but largely irrelevant because you can simply create subdirectories to hold more files.
Most early microcomputer operating systems were single-level - Apple DOS, CP/M, MS-DOS/PC-DOS prior to version 2.0, UCSD P-System, whatever Commodore called their DOS for the PET/CBM and C64. With the exception of UCSD P-System, which had a maximum of 77 files in the directory, I don't believe any of them had an inherent limit to the number of files, but most of them did have practical limits due to the amount of space allocated for the directory.
In addition to the examples already given a couple more used a flat data structure with an absolute limit on the number of files but one property assigned to each file was its directory. So the real storage was single level — a single data structure, with file names being required to be unique across the entire disk — but it was presented as if a single level of directories.
The Macintosh File System, the predecessor to HFS that lasted for only just more than a year, was one such; the maximum file count was a function of volume size, and worked out as 128 for the machine's original 400kb floppies. A file's directory information was stored in the desktop database, so rebuilding the desktop would flatten the disk's hierarchy.
Acorn's DFS is another, even more limited implementation — the pseudo-directory names are only a single character in length and only 31 files are permitted per disk per side, disks initially topping out at 200kb/side.
Yes. Several. Consider, for example Dec RSTS/E. This was a flat directory structure.
Now, to be clear, the system had separate accounts. So, each user would have their own account/directory. Very similar to Users in CP/M. But they weren't hierarchical.
As for RSTS/E file capacity, I don't know the specifics, but I'm sure it had a limit of the total number of files on a specific device. Even modern Unix filesystems have limits to the number of files they can have. They just tend to be absurd limits.
Does 'single level' mean exactly one directory a la early DOS floppies, i.e., no directories other than the root?
Or does it mean multiple directories, no nesting, except maybe of user directories in the root directory? So you have directories /foo and /bar, and we can overlook the fact that there's actually a directory called / which contains foo and bar?
For my answer I'm going to assume the latter, since the users of such systems tend to regard them as single-level directory systems.
In which case: I'd guess this was once more common than hierarchical directory systems. The influential description of hierarchical systems was this document from 1965. But even after that, there were single-level systems. The early DEC systems I used -- TOPS-10, RSX-11M, RSTS/E -- supported one level of directory, and tended to conflate "directory" and "user".
I think the only system I used before about 1980 that had nested directories was GEORGE 3 (on ICL 1900), and that was definitely influenced by the Neumann/Daley paper.
I'm not sure about the PET or VIC20, but the C64, C128, C128D, Plus/4, C16, and related machines used a ROM OS, rather than a DOS. That said, they all used basically the same flat disk format, with a limit of 144 files per directory. With the 1541, there were a total of 664 blocks per side of a disk, but one could only access one side at a time. With the 1571, you could access both sides of a double-sided disk, for a maximum of 1328 blocks.
Commodore also made a B128, but that was a very different machine, and I don't really remember much about it besides it actually loading files at a reasonable (compared to the C64/C128) speed. We had a B128 with an internal floppy disk, and I can't find any details about this online to confirm my vague recollections.