The Essence of Software by Jackson Daniel

The Essence of Software by Jackson Daniel

Author:Jackson, Daniel [Jackson, Daniel]
Language: eng
Format: epub
Publisher: Princeton University Press
Published: 2021-11-16T00:00:00+00:00


Chapter 2: Discovering Concepts

   15 . The Unix origins of Dropbox’s folder concept. Dropbox adopted the concept of folder from the Unix operating system, in which a folder is called a directory. This design has many elegant aspects. In particular, since the names of files and directories are not treated as metadata but are simply contained within directory entries, there is no need for any additional structure in the file system for maintaining this information; directories can be represented with data blocks just like files, albeit with a special interpretation.

Allowing a file or directory to have more than one parent, a feature of Dropbox adopted from Unix (and essential for expressing sharing), is powerful but even in the single-user Unix setting brings some nasty complications. Deletion of a file does not simply eliminate it, but rather deletes a directory entry—and the file might still be linked through another directory. Consequently, reclaiming storage requires a form of garbage collection to identify inaccessible files.

From the user’s perspective, the possibility of multiple parents produces at least three other surprises. First, novice Unix users, expecting a folder to “contain” other files and folders (rather than just containing named links), look in vain to find an option for the directory-listing command that tells you how big a directory is—that is, how much disk space it occupies. Such an option does not exist, arguably for good reason (since a file can have two parent folders, so it’s not clear how the file’s space consumption should be assigned). Instead you need to use a different command (called du, for “disk usage”) which, in classic Unix style, will generate by default a report of sizes of all reachable directories without specifying the unit of measurement! Needless to say, only computer scientists would tolerate such unusable software, so when the Unix file system was adopted by Apple for the Macintosh, this was all hidden away, and the Finder displays folder sizes as expected.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.