syncfiles/tech/filesystems.html

2 lines
11 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <title>Filesystems - SyncFiles Documentation</title> <link rel="shortcut icon" href="/syncfiles/favicon.ico" type="image/x-icon"> <link rel="stylesheet" href="/syncfiles/assets/css/just-the-docs-default.css"> <script type="text/javascript" src="/syncfiles/assets/js/vendor/lunr.min.js"></script> <script type="text/javascript" src="/syncfiles/assets/js/just-the-docs.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Begin Jekyll SEO tag v2.8.0 --> <title>Filesystems | SyncFiles Documentation</title> <meta name="generator" content="Jekyll v4.2.2" /> <meta property="og:title" content="Filesystems" /> <meta property="og:locale" content="en_US" /> <meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description." /> <meta property="og:description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description." /> <link rel="canonical" href="https://depp.github.io/syncfiles/tech/filesystems" /> <meta property="og:url" content="https://depp.github.io/syncfiles/tech/filesystems" /> <meta property="og:site_name" content="SyncFiles Documentation" /> <meta property="og:type" content="website" /> <meta name="twitter:card" content="summary" /> <meta property="twitter:title" content="Filesystems" /> <script type="application/ld+json"> {"@context":"https://schema.org","@type":"WebPage","description":"Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.","headline":"Filesystems","url":"https://depp.github.io/syncfiles/tech/filesystems"}</script> <!-- End Jekyll SEO tag --> </head> <body> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol id="svg-link" viewBox="0 0 24 24"> <title>Link</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"> <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path> </svg> </symbol> <symbol id="svg-search" viewBox="0 0 24 24"> <title>Search</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"> <circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line> </svg> </symbol> <symbol id="svg-menu" viewBox="0 0 24 24"> <title>Menu</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"> <line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line> </svg> </symbol> <symbol id="svg-arrow-right" viewBox="0 0 24 24"> <title>Expand</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"> <polyline points="9 18 15 12 9 6"></polyline> </svg> </symbol> <symbol id="svg-doc" viewBox="0 0 24 24"> <title>Document</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file"> <path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline> </svg> </symbol> </svg> <div class="side-bar"> <div class="site-header"> <a href="https://depp.github.io/syncfiles/" class="site-title lh-tight"> SyncFiles Documentation </a> <a href="#" id="menu-button" class="site-button"> <svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg> </a> </div> <nav role="navigation" aria-label="Main" id="site-nav" class="site-nav"> <ul class="nav-list"><li class="nav-list-item active"><a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a><a href="https://depp.github.io/syncfiles/tech/" class="nav-list-link">Technical Guide</a><ul class="nav-list "><li class="nav-list-item "><a href="https://depp.github.io/syncfiles/tech/archive-formats" class="nav-list-link">Archive Formats</a></li><li class="nav-list-item "><a href="https://depp.github.io/syncfiles/tech/resource-forks" class="nav-list-link">Resource Forks</a></li><li class="nav-list-item "><a href="https://depp.github.io/syncfiles/tech/finder-info" class="nav-list-link">Finder Info</a></li><li class="nav-list-item "><a href="https://depp.github.io/syncfiles/tech/apis" class="nav-list-link">File APIs</a></li><li class="nav-list-item active"><a href="https://depp.github.io/syncfiles/tech/filesystems" class="nav-list-link active">Filesystems</a></li><li class="nav-list-item "><a href="https://depp.github.io/syncfiles/tech/safe-saving" class="nav-list-link">Safe Saving</a></li></ul></li><li class="nav-list-item"><a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a><a href="https://depp.github.io/syncfiles/" class="nav-list-link">Home</a><ul class="nav-list "></ul></li></ul> </nav> <footer class="site-footer"> This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll. </footer> </div> <div class="main" id="top"> <div id="main-header" class="main-header"> <div class="search"> <div class="search-input-wrap"> <input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search SyncFiles Documentation" aria-label="Search SyncFiles Documentation" autocomplete="off"> <label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label> </div> <div id="search-results" class="search-results"></div> </div> </div> <div id="main-content-wrap" class="main-content-wrap"> <nav aria-label="Breadcrumb" class="breadcrumb-nav"> <ol class="breadcrumb-nav-list"> <li class="breadcrumb-nav-list-item"><a href="https://depp.github.io/syncfiles/tech/">Technical Guide</a></li> <li class="breadcrumb-nav-list-item"><span>Filesystems</span></li> </ol> </nav> <div id="main-content" class="main-content" role="main"> <h1 id="filesystems"> <a href="#filesystems" class="anchor-heading" aria-labelledby="filesystems"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Filesystems </h1> <p>This document focuses on the different filesystems used by Mac OS over the years and how filenames work on these filesystems.</p> <h2 id="mfs"> <a href="#mfs" class="anchor-heading" aria-labelledby="mfs"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> MFS </h2> <p>Macintosh file system (MFS) is Apples filesystem for the first Macintosh. MFS does not support directories and has a maximum filename length of 63 characters. According to Wikipedia, the final OS versions that supported MFS were 7.6 for read-write access and 8.0 for read-only access.</p> <p>It is unusual to see this filesystem in practice, since it was replaced by HFS shortly after it appeared.</p> <h2 id="hfs"> <a href="#hfs" class="anchor-heading" aria-labelledby="hfs"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> HFS </h2> <p>Hierarchical file system (HFS) was introduced shortly after MFS and replaced MFS. It first appeared alongside Apples first Macintosh hard disk, the “Hard Disk 20” in 1985, and afterwards appeared in the 128K ROM on the Mac Plus. HFS introduces directories and a new set of file APIs.</p> <p>The final versions of Mac OS which support HFS are Mac OS X 10.5 Leopard for read-write access and macOS 10.14 Mojave for read-only access.</p> <p>HFS has a maximum filename length to 31 characters. The script used for the filename is recorded, but filenames are compared as if they are were encoded using the Macintosh Roman encoding. Filenames are case insensitive, and the sort order is described on page A-20 of <em>Inside Macintosh: Text</em> (1993).</p> <h2 id="hfs-plus"> <a href="#hfs-plus" class="anchor-heading" aria-labelledby="hfs-plus"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> HFS Plus </h2> <p>HFS Plus was introduced with Mac OS 8.1 and added support for filesystem journaling, Unicode filenames, up to 255 characters per filename, and case-sensitive filenames if enabled. Mac OS 8.1 was released in January 1998.</p> <p>To provide backwards compatibility with older APIs, HFS Plus records the encoding that filenames should be encoded with when listing files in the older APIs. The volume header tracks a list of all encodings used for all filenames on the volume, so the appropriate conversion tables can be loaded when the volume is mounted. When an application using an older API lists the files in a directory, it will see backwards-compatible filenames substituted for filenames that use unsupported characters or filenames that are too long.</p> <p>Filenames are stored in UTF-16, decomposed using the rules from Unicode 2.1 (up to Mac OS X 10.2) or Unicode 3.2 (for Mac OS X 10.3 and later).</p> <p>See <a href="https://developer.apple.com/library/archive/technotes/tn/tn1150.html">Apple Technical Note TN1150: HFS Plus Volume Format</a>.</p> <p>There is a variant of HFS Plus called HFSX. The major difference between normal HFS Plus and HFSX is that HFSX does not carry an HFS wrapper for backwards compatibility with systems that do not support HFS Plus.</p> <h2 id="apfs"> <a href="#apfs" class="anchor-heading" aria-labelledby="apfs"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> APFS </h2> <p>APFS is introduced in macOS 10.12.4. Filenames are encoded using UTF-8. Only code points assigned in Unicode 9.0 are permitted in filenames. APFS does not normalize filenames, but does store files by using the hash of the normalized version of the filename.</p> <h2 id="ufs"> <a href="#ufs" class="anchor-heading" aria-labelledby="ufs"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> UFS </h2> <p>UFS stands for <em>Unix file system</em>. It is a case-sensitive filesystem which is only supported by Mac OS X versions 10.0 through 10.5.</p> <p>UFS is not seen often.</p> <h2 id="disk-images"> <a href="#disk-images" class="anchor-heading" aria-labelledby="disk-images"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Disk Images </h2> <p>There are various formats for disk images: Disc Copy 4.2 images, NDIF images, and UDIF images.</p> </div> </div> <div class="search-overlay"></div> </div> </body> </html>