├── .gitignore ├── FSKitExp.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── FSKitExp.xcscheme ├── FSKitExp ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── ContentView.swift ├── FSKitExp.entitlements ├── FSKitExpApp.swift ├── Info.plist ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json └── ViewModel.swift ├── FSKitExpExtension ├── Constants.swift ├── FSKitExpExtension.entitlements ├── FSKitExpExtension.swift ├── Info.plist ├── MyFS.swift ├── MyFSItem.swift └── MyFSVolume.swift ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Xcode 4 | # 5 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 6 | 7 | ## User settings 8 | xcuserdata/ 9 | 10 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 11 | *.xcscmblueprint 12 | *.xccheckout 13 | 14 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 15 | build/ 16 | DerivedData/ 17 | *.moved-aside 18 | *.pbxuser 19 | !default.pbxuser 20 | *.mode1v3 21 | !default.mode1v3 22 | *.mode2v3 23 | !default.mode2v3 24 | *.perspectivev3 25 | !default.perspectivev3 26 | 27 | ## Obj-C/Swift specific 28 | *.hmap 29 | 30 | ## App packaging 31 | *.ipa 32 | *.dSYM.zip 33 | *.dSYM 34 | 35 | ## Playgrounds 36 | timeline.xctimeline 37 | playground.xcworkspace 38 | 39 | # Swift Package Manager 40 | # 41 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 42 | # Packages/ 43 | # Package.pins 44 | # Package.resolved 45 | # *.xcodeproj 46 | # 47 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 48 | # hence it is not needed unless you have added a package configuration file to your project 49 | # .swiftpm 50 | 51 | .build/ 52 | 53 | # CocoaPods 54 | # 55 | # We recommend against adding the Pods directory to your .gitignore. However 56 | # you should judge for yourself, the pros and cons are mentioned at: 57 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 58 | # 59 | # Pods/ 60 | # 61 | # Add this line if you want to avoid checking in source code from the Xcode workspace 62 | # *.xcworkspace 63 | 64 | # Carthage 65 | # 66 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 67 | # Carthage/Checkouts 68 | 69 | Carthage/Build/ 70 | 71 | # Accio dependency management 72 | Dependencies/ 73 | .accio/ 74 | 75 | # fastlane 76 | # 77 | # It is recommended to not store the screenshots in the git repo. 78 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 79 | # For more information about the recommended setup visit: 80 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 81 | 82 | fastlane/report.xml 83 | fastlane/Preview.html 84 | fastlane/screenshots/**/*.png 85 | fastlane/test_output 86 | 87 | # Code Injection 88 | # 89 | # After new code Injection tools there's a generated folder /iOSInjectionProject 90 | # https://github.com/johnno1962/injectionforxcode 91 | 92 | iOSInjectionProject/ 93 | -------------------------------------------------------------------------------- /FSKitExp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 70; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | CC3283482D99D02200EFFA01 /* FSKitExpExtension.appex in Embed ExtensionKit Extensions */ = {isa = PBXBuildFile; fileRef = CC32833E2D99D02200EFFA01 /* FSKitExpExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 11 | CCF967F02C1C110D00FBE72D /* FSKitExpApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCF967EF2C1C110D00FBE72D /* FSKitExpApp.swift */; }; 12 | CCF967F22C1C110D00FBE72D /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCF967F12C1C110D00FBE72D /* ContentView.swift */; }; 13 | CCF967F42C1C110E00FBE72D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CCF967F32C1C110E00FBE72D /* Assets.xcassets */; }; 14 | CCF967F72C1C110E00FBE72D /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CCF967F62C1C110E00FBE72D /* Preview Assets.xcassets */; }; 15 | CCF9682C2C1C13B300FBE72D /* ViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCF9682B2C1C13AF00FBE72D /* ViewModel.swift */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | CC3283462D99D02200EFFA01 /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = CCF967E42C1C110D00FBE72D /* Project object */; 22 | proxyType = 1; 23 | remoteGlobalIDString = CC32833D2D99D02200EFFA01; 24 | remoteInfo = FSKitExpExtension; 25 | }; 26 | /* End PBXContainerItemProxy section */ 27 | 28 | /* Begin PBXCopyFilesBuildPhase section */ 29 | CCF9682A2C1C113500FBE72D /* Embed ExtensionKit Extensions */ = { 30 | isa = PBXCopyFilesBuildPhase; 31 | buildActionMask = 2147483647; 32 | dstPath = "$(EXTENSIONS_FOLDER_PATH)"; 33 | dstSubfolderSpec = 16; 34 | files = ( 35 | CC3283482D99D02200EFFA01 /* FSKitExpExtension.appex in Embed ExtensionKit Extensions */, 36 | ); 37 | name = "Embed ExtensionKit Extensions"; 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXCopyFilesBuildPhase section */ 41 | 42 | /* Begin PBXFileReference section */ 43 | CC32833E2D99D02200EFFA01 /* FSKitExpExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.extensionkit-extension"; includeInIndex = 0; path = FSKitExpExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | CCF967EC2C1C110D00FBE72D /* FSKitExp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FSKitExp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | CCF967EF2C1C110D00FBE72D /* FSKitExpApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FSKitExpApp.swift; sourceTree = ""; }; 46 | CCF967F12C1C110D00FBE72D /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 47 | CCF967F32C1C110E00FBE72D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 48 | CCF967F62C1C110E00FBE72D /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 49 | CCF967F82C1C110E00FBE72D /* FSKitExp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = FSKitExp.entitlements; sourceTree = ""; }; 50 | CCF9682B2C1C13AF00FBE72D /* ViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewModel.swift; sourceTree = ""; }; 51 | CCF9682D2C1C14AE00FBE72D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ 55 | CC3283492D99D02200EFFA01 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = { 56 | isa = PBXFileSystemSynchronizedBuildFileExceptionSet; 57 | membershipExceptions = ( 58 | Info.plist, 59 | ); 60 | target = CC32833D2D99D02200EFFA01 /* FSKitExpExtension */; 61 | }; 62 | /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ 63 | 64 | /* Begin PBXFileSystemSynchronizedRootGroup section */ 65 | CC32833F2D99D02200EFFA01 /* FSKitExpExtension */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (CC3283492D99D02200EFFA01 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = FSKitExpExtension; sourceTree = ""; }; 66 | /* End PBXFileSystemSynchronizedRootGroup section */ 67 | 68 | /* Begin PBXFrameworksBuildPhase section */ 69 | CC32833B2D99D02200EFFA01 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | CCF967E92C1C110D00FBE72D /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | /* End PBXFrameworksBuildPhase section */ 84 | 85 | /* Begin PBXGroup section */ 86 | CCF967E32C1C110D00FBE72D = { 87 | isa = PBXGroup; 88 | children = ( 89 | CCF967EE2C1C110D00FBE72D /* FSKitExp */, 90 | CC32833F2D99D02200EFFA01 /* FSKitExpExtension */, 91 | CCF967ED2C1C110D00FBE72D /* Products */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | CCF967ED2C1C110D00FBE72D /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | CCF967EC2C1C110D00FBE72D /* FSKitExp.app */, 99 | CC32833E2D99D02200EFFA01 /* FSKitExpExtension.appex */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | CCF967EE2C1C110D00FBE72D /* FSKitExp */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | CCF9682D2C1C14AE00FBE72D /* Info.plist */, 108 | CCF967EF2C1C110D00FBE72D /* FSKitExpApp.swift */, 109 | CCF967F12C1C110D00FBE72D /* ContentView.swift */, 110 | CCF9682B2C1C13AF00FBE72D /* ViewModel.swift */, 111 | CCF967F32C1C110E00FBE72D /* Assets.xcassets */, 112 | CCF967F82C1C110E00FBE72D /* FSKitExp.entitlements */, 113 | CCF967F52C1C110E00FBE72D /* Preview Content */, 114 | ); 115 | path = FSKitExp; 116 | sourceTree = ""; 117 | }; 118 | CCF967F52C1C110E00FBE72D /* Preview Content */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | CCF967F62C1C110E00FBE72D /* Preview Assets.xcassets */, 122 | ); 123 | path = "Preview Content"; 124 | sourceTree = ""; 125 | }; 126 | /* End PBXGroup section */ 127 | 128 | /* Begin PBXNativeTarget section */ 129 | CC32833D2D99D02200EFFA01 /* FSKitExpExtension */ = { 130 | isa = PBXNativeTarget; 131 | buildConfigurationList = CC32834A2D99D02200EFFA01 /* Build configuration list for PBXNativeTarget "FSKitExpExtension" */; 132 | buildPhases = ( 133 | CC32833A2D99D02200EFFA01 /* Sources */, 134 | CC32833B2D99D02200EFFA01 /* Frameworks */, 135 | CC32833C2D99D02200EFFA01 /* Resources */, 136 | ); 137 | buildRules = ( 138 | ); 139 | dependencies = ( 140 | ); 141 | fileSystemSynchronizedGroups = ( 142 | CC32833F2D99D02200EFFA01 /* FSKitExpExtension */, 143 | ); 144 | name = FSKitExpExtension; 145 | packageProductDependencies = ( 146 | ); 147 | productName = FSKitExpExtension; 148 | productReference = CC32833E2D99D02200EFFA01 /* FSKitExpExtension.appex */; 149 | productType = "com.apple.product-type.extensionkit-extension"; 150 | }; 151 | CCF967EB2C1C110D00FBE72D /* FSKitExp */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = CCF968112C1C110E00FBE72D /* Build configuration list for PBXNativeTarget "FSKitExp" */; 154 | buildPhases = ( 155 | CCF967E82C1C110D00FBE72D /* Sources */, 156 | CCF967E92C1C110D00FBE72D /* Frameworks */, 157 | CCF967EA2C1C110D00FBE72D /* Resources */, 158 | CCF9682A2C1C113500FBE72D /* Embed ExtensionKit Extensions */, 159 | ); 160 | buildRules = ( 161 | ); 162 | dependencies = ( 163 | CC3283472D99D02200EFFA01 /* PBXTargetDependency */, 164 | ); 165 | name = FSKitExp; 166 | productName = FSKitExp; 167 | productReference = CCF967EC2C1C110D00FBE72D /* FSKitExp.app */; 168 | productType = "com.apple.product-type.application"; 169 | }; 170 | /* End PBXNativeTarget section */ 171 | 172 | /* Begin PBXProject section */ 173 | CCF967E42C1C110D00FBE72D /* Project object */ = { 174 | isa = PBXProject; 175 | attributes = { 176 | BuildIndependentTargetsInParallel = 1; 177 | LastSwiftUpdateCheck = 1630; 178 | LastUpgradeCheck = 1630; 179 | TargetAttributes = { 180 | CC32833D2D99D02200EFFA01 = { 181 | CreatedOnToolsVersion = 16.3; 182 | LastSwiftMigration = 1630; 183 | }; 184 | CCF967EB2C1C110D00FBE72D = { 185 | CreatedOnToolsVersion = 16.0; 186 | }; 187 | }; 188 | }; 189 | buildConfigurationList = CCF967E72C1C110D00FBE72D /* Build configuration list for PBXProject "FSKitExp" */; 190 | compatibilityVersion = "Xcode 15.0"; 191 | developmentRegion = en; 192 | hasScannedForEncodings = 0; 193 | knownRegions = ( 194 | en, 195 | Base, 196 | ); 197 | mainGroup = CCF967E32C1C110D00FBE72D; 198 | productRefGroup = CCF967ED2C1C110D00FBE72D /* Products */; 199 | projectDirPath = ""; 200 | projectRoot = ""; 201 | targets = ( 202 | CCF967EB2C1C110D00FBE72D /* FSKitExp */, 203 | CC32833D2D99D02200EFFA01 /* FSKitExpExtension */, 204 | ); 205 | }; 206 | /* End PBXProject section */ 207 | 208 | /* Begin PBXResourcesBuildPhase section */ 209 | CC32833C2D99D02200EFFA01 /* Resources */ = { 210 | isa = PBXResourcesBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | ); 214 | runOnlyForDeploymentPostprocessing = 0; 215 | }; 216 | CCF967EA2C1C110D00FBE72D /* Resources */ = { 217 | isa = PBXResourcesBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | CCF967F72C1C110E00FBE72D /* Preview Assets.xcassets in Resources */, 221 | CCF967F42C1C110E00FBE72D /* Assets.xcassets in Resources */, 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | /* End PBXResourcesBuildPhase section */ 226 | 227 | /* Begin PBXSourcesBuildPhase section */ 228 | CC32833A2D99D02200EFFA01 /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | ); 233 | runOnlyForDeploymentPostprocessing = 0; 234 | }; 235 | CCF967E82C1C110D00FBE72D /* Sources */ = { 236 | isa = PBXSourcesBuildPhase; 237 | buildActionMask = 2147483647; 238 | files = ( 239 | CCF967F22C1C110D00FBE72D /* ContentView.swift in Sources */, 240 | CCF9682C2C1C13B300FBE72D /* ViewModel.swift in Sources */, 241 | CCF967F02C1C110D00FBE72D /* FSKitExpApp.swift in Sources */, 242 | ); 243 | runOnlyForDeploymentPostprocessing = 0; 244 | }; 245 | /* End PBXSourcesBuildPhase section */ 246 | 247 | /* Begin PBXTargetDependency section */ 248 | CC3283472D99D02200EFFA01 /* PBXTargetDependency */ = { 249 | isa = PBXTargetDependency; 250 | target = CC32833D2D99D02200EFFA01 /* FSKitExpExtension */; 251 | targetProxy = CC3283462D99D02200EFFA01 /* PBXContainerItemProxy */; 252 | }; 253 | /* End PBXTargetDependency section */ 254 | 255 | /* Begin XCBuildConfiguration section */ 256 | CC32834B2D99D02200EFFA01 /* Debug */ = { 257 | isa = XCBuildConfiguration; 258 | buildSettings = { 259 | CLANG_ENABLE_MODULES = YES; 260 | CODE_SIGN_ENTITLEMENTS = FSKitExpExtension/FSKitExpExtension.entitlements; 261 | CODE_SIGN_STYLE = Automatic; 262 | CURRENT_PROJECT_VERSION = 1; 263 | DEAD_CODE_STRIPPING = YES; 264 | ENABLE_HARDENED_RUNTIME = YES; 265 | GENERATE_INFOPLIST_FILE = YES; 266 | INFOPLIST_FILE = FSKitExpExtension/Info.plist; 267 | INFOPLIST_KEY_CFBundleDisplayName = FSKitExpExtension; 268 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 269 | LD_RUNPATH_SEARCH_PATHS = ( 270 | "$(inherited)", 271 | "@executable_path/../Frameworks", 272 | "@executable_path/../../../../Frameworks", 273 | ); 274 | MACOSX_DEPLOYMENT_TARGET = 15.4; 275 | MARKETING_VERSION = 1.0; 276 | PRODUCT_BUNDLE_IDENTIFIER = app.cerio.FSKitExp.FSKitExpExtension; 277 | PRODUCT_NAME = "$(TARGET_NAME)"; 278 | SKIP_INSTALL = YES; 279 | SWIFT_EMIT_LOC_STRINGS = YES; 280 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 281 | SWIFT_VERSION = 5.0; 282 | }; 283 | name = Debug; 284 | }; 285 | CC32834C2D99D02200EFFA01 /* Release */ = { 286 | isa = XCBuildConfiguration; 287 | buildSettings = { 288 | CLANG_ENABLE_MODULES = YES; 289 | CODE_SIGN_ENTITLEMENTS = FSKitExpExtension/FSKitExpExtension.entitlements; 290 | CODE_SIGN_STYLE = Automatic; 291 | CURRENT_PROJECT_VERSION = 1; 292 | DEAD_CODE_STRIPPING = YES; 293 | ENABLE_HARDENED_RUNTIME = YES; 294 | GENERATE_INFOPLIST_FILE = YES; 295 | INFOPLIST_FILE = FSKitExpExtension/Info.plist; 296 | INFOPLIST_KEY_CFBundleDisplayName = FSKitExpExtension; 297 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 298 | LD_RUNPATH_SEARCH_PATHS = ( 299 | "$(inherited)", 300 | "@executable_path/../Frameworks", 301 | "@executable_path/../../../../Frameworks", 302 | ); 303 | MACOSX_DEPLOYMENT_TARGET = 15.4; 304 | MARKETING_VERSION = 1.0; 305 | PRODUCT_BUNDLE_IDENTIFIER = app.cerio.FSKitExp.FSKitExpExtension; 306 | PRODUCT_NAME = "$(TARGET_NAME)"; 307 | SKIP_INSTALL = YES; 308 | SWIFT_EMIT_LOC_STRINGS = YES; 309 | SWIFT_VERSION = 5.0; 310 | }; 311 | name = Release; 312 | }; 313 | CCF9680F2C1C110E00FBE72D /* Debug */ = { 314 | isa = XCBuildConfiguration; 315 | buildSettings = { 316 | ALWAYS_SEARCH_USER_PATHS = NO; 317 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 318 | CLANG_ANALYZER_NONNULL = YES; 319 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 320 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 321 | CLANG_ENABLE_MODULES = YES; 322 | CLANG_ENABLE_OBJC_ARC = YES; 323 | CLANG_ENABLE_OBJC_WEAK = YES; 324 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 325 | CLANG_WARN_BOOL_CONVERSION = YES; 326 | CLANG_WARN_COMMA = YES; 327 | CLANG_WARN_CONSTANT_CONVERSION = YES; 328 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 329 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 330 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 331 | CLANG_WARN_EMPTY_BODY = YES; 332 | CLANG_WARN_ENUM_CONVERSION = YES; 333 | CLANG_WARN_INFINITE_RECURSION = YES; 334 | CLANG_WARN_INT_CONVERSION = YES; 335 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 336 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 337 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 338 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 339 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 340 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 341 | CLANG_WARN_STRICT_PROTOTYPES = YES; 342 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 343 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 344 | CLANG_WARN_UNREACHABLE_CODE = YES; 345 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 346 | COPY_PHASE_STRIP = NO; 347 | DEAD_CODE_STRIPPING = YES; 348 | DEBUG_INFORMATION_FORMAT = dwarf; 349 | DEVELOPMENT_TEAM = PP4C5TR737; 350 | ENABLE_STRICT_OBJC_MSGSEND = YES; 351 | ENABLE_TESTABILITY = YES; 352 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 353 | GCC_C_LANGUAGE_STANDARD = gnu17; 354 | GCC_DYNAMIC_NO_PIC = NO; 355 | GCC_NO_COMMON_BLOCKS = YES; 356 | GCC_OPTIMIZATION_LEVEL = 0; 357 | GCC_PREPROCESSOR_DEFINITIONS = ( 358 | "DEBUG=1", 359 | "$(inherited)", 360 | ); 361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 363 | GCC_WARN_UNDECLARED_SELECTOR = YES; 364 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 365 | GCC_WARN_UNUSED_FUNCTION = YES; 366 | GCC_WARN_UNUSED_VARIABLE = YES; 367 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 368 | MACOSX_DEPLOYMENT_TARGET = 15.0; 369 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 370 | MTL_FAST_MATH = YES; 371 | ONLY_ACTIVE_ARCH = YES; 372 | SDKROOT = macosx; 373 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 374 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 375 | }; 376 | name = Debug; 377 | }; 378 | CCF968102C1C110E00FBE72D /* Release */ = { 379 | isa = XCBuildConfiguration; 380 | buildSettings = { 381 | ALWAYS_SEARCH_USER_PATHS = NO; 382 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 383 | CLANG_ANALYZER_NONNULL = YES; 384 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 385 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 386 | CLANG_ENABLE_MODULES = YES; 387 | CLANG_ENABLE_OBJC_ARC = YES; 388 | CLANG_ENABLE_OBJC_WEAK = YES; 389 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 390 | CLANG_WARN_BOOL_CONVERSION = YES; 391 | CLANG_WARN_COMMA = YES; 392 | CLANG_WARN_CONSTANT_CONVERSION = YES; 393 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 394 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 395 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 396 | CLANG_WARN_EMPTY_BODY = YES; 397 | CLANG_WARN_ENUM_CONVERSION = YES; 398 | CLANG_WARN_INFINITE_RECURSION = YES; 399 | CLANG_WARN_INT_CONVERSION = YES; 400 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 401 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 402 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 403 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 404 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 405 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 406 | CLANG_WARN_STRICT_PROTOTYPES = YES; 407 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 408 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 409 | CLANG_WARN_UNREACHABLE_CODE = YES; 410 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 411 | COPY_PHASE_STRIP = NO; 412 | DEAD_CODE_STRIPPING = YES; 413 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 414 | DEVELOPMENT_TEAM = PP4C5TR737; 415 | ENABLE_NS_ASSERTIONS = NO; 416 | ENABLE_STRICT_OBJC_MSGSEND = YES; 417 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 418 | GCC_C_LANGUAGE_STANDARD = gnu17; 419 | GCC_NO_COMMON_BLOCKS = YES; 420 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 421 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 422 | GCC_WARN_UNDECLARED_SELECTOR = YES; 423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 424 | GCC_WARN_UNUSED_FUNCTION = YES; 425 | GCC_WARN_UNUSED_VARIABLE = YES; 426 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 427 | MACOSX_DEPLOYMENT_TARGET = 15.0; 428 | MTL_ENABLE_DEBUG_INFO = NO; 429 | MTL_FAST_MATH = YES; 430 | SDKROOT = macosx; 431 | SWIFT_COMPILATION_MODE = wholemodule; 432 | }; 433 | name = Release; 434 | }; 435 | CCF968122C1C110E00FBE72D /* Debug */ = { 436 | isa = XCBuildConfiguration; 437 | buildSettings = { 438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 439 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 440 | CODE_SIGN_ENTITLEMENTS = FSKitExp/FSKitExp.entitlements; 441 | CODE_SIGN_STYLE = Automatic; 442 | COMBINE_HIDPI_IMAGES = YES; 443 | CURRENT_PROJECT_VERSION = 1; 444 | DEAD_CODE_STRIPPING = YES; 445 | DEVELOPMENT_ASSET_PATHS = "\"FSKitExp/Preview Content\""; 446 | ENABLE_HARDENED_RUNTIME = YES; 447 | ENABLE_PREVIEWS = YES; 448 | GENERATE_INFOPLIST_FILE = YES; 449 | INFOPLIST_FILE = FSKitExp/Info.plist; 450 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 451 | LD_RUNPATH_SEARCH_PATHS = ( 452 | "$(inherited)", 453 | "@executable_path/../Frameworks", 454 | ); 455 | MACOSX_DEPLOYMENT_TARGET = 15.4; 456 | MARKETING_VERSION = 1.0; 457 | PRODUCT_BUNDLE_IDENTIFIER = app.cerio.FSKitExp; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | SWIFT_EMIT_LOC_STRINGS = YES; 460 | SWIFT_VERSION = 5.0; 461 | }; 462 | name = Debug; 463 | }; 464 | CCF968132C1C110E00FBE72D /* Release */ = { 465 | isa = XCBuildConfiguration; 466 | buildSettings = { 467 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 468 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 469 | CODE_SIGN_ENTITLEMENTS = FSKitExp/FSKitExp.entitlements; 470 | CODE_SIGN_STYLE = Automatic; 471 | COMBINE_HIDPI_IMAGES = YES; 472 | CURRENT_PROJECT_VERSION = 1; 473 | DEAD_CODE_STRIPPING = YES; 474 | DEVELOPMENT_ASSET_PATHS = "\"FSKitExp/Preview Content\""; 475 | ENABLE_HARDENED_RUNTIME = YES; 476 | ENABLE_PREVIEWS = YES; 477 | GENERATE_INFOPLIST_FILE = YES; 478 | INFOPLIST_FILE = FSKitExp/Info.plist; 479 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 480 | LD_RUNPATH_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "@executable_path/../Frameworks", 483 | ); 484 | MACOSX_DEPLOYMENT_TARGET = 15.4; 485 | MARKETING_VERSION = 1.0; 486 | PRODUCT_BUNDLE_IDENTIFIER = app.cerio.FSKitExp; 487 | PRODUCT_NAME = "$(TARGET_NAME)"; 488 | SWIFT_EMIT_LOC_STRINGS = YES; 489 | SWIFT_VERSION = 5.0; 490 | }; 491 | name = Release; 492 | }; 493 | /* End XCBuildConfiguration section */ 494 | 495 | /* Begin XCConfigurationList section */ 496 | CC32834A2D99D02200EFFA01 /* Build configuration list for PBXNativeTarget "FSKitExpExtension" */ = { 497 | isa = XCConfigurationList; 498 | buildConfigurations = ( 499 | CC32834B2D99D02200EFFA01 /* Debug */, 500 | CC32834C2D99D02200EFFA01 /* Release */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | CCF967E72C1C110D00FBE72D /* Build configuration list for PBXProject "FSKitExp" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | CCF9680F2C1C110E00FBE72D /* Debug */, 509 | CCF968102C1C110E00FBE72D /* Release */, 510 | ); 511 | defaultConfigurationIsVisible = 0; 512 | defaultConfigurationName = Release; 513 | }; 514 | CCF968112C1C110E00FBE72D /* Build configuration list for PBXNativeTarget "FSKitExp" */ = { 515 | isa = XCConfigurationList; 516 | buildConfigurations = ( 517 | CCF968122C1C110E00FBE72D /* Debug */, 518 | CCF968132C1C110E00FBE72D /* Release */, 519 | ); 520 | defaultConfigurationIsVisible = 0; 521 | defaultConfigurationName = Release; 522 | }; 523 | /* End XCConfigurationList section */ 524 | }; 525 | rootObject = CCF967E42C1C110D00FBE72D /* Project object */; 526 | } 527 | -------------------------------------------------------------------------------- /FSKitExp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FSKitExp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /FSKitExp.xcodeproj/xcshareddata/xcschemes/FSKitExp.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | 16 | 22 | 23 | 24 | 25 | 26 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /FSKitExp/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /FSKitExp/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "scale" : "1x", 6 | "size" : "16x16" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "scale" : "2x", 11 | "size" : "16x16" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "scale" : "1x", 16 | "size" : "32x32" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "scale" : "2x", 21 | "size" : "32x32" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "scale" : "1x", 26 | "size" : "128x128" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "scale" : "2x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "scale" : "1x", 36 | "size" : "256x256" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "scale" : "2x", 41 | "size" : "256x256" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "scale" : "1x", 46 | "size" : "512x512" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "scale" : "2x", 51 | "size" : "512x512" 52 | } 53 | ], 54 | "info" : { 55 | "author" : "xcode", 56 | "version" : 1 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /FSKitExp/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /FSKitExp/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // FSKitExp 4 | // 5 | // Created by Khaos Tian on 6/13/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | @State 13 | private var viewModel = ViewModel() 14 | 15 | var body: some View { 16 | List { 17 | ForEach(viewModel.modules, id: \.self) { module in 18 | VStack(alignment: .leading) { 19 | Text(module.bundleIdentifier) 20 | .bold() 21 | Text(module.url.absoluteString) 22 | Text("\(module.isEnabled)") 23 | } 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /FSKitExp/FSKitExp.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.temporary-exception.mach-lookup.global-name 10 | 11 | com.apple.filesystems.fskitd 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /FSKitExp/FSKitExpApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FSKitExpApp.swift 3 | // FSKitExp 4 | // 5 | // Created by Khaos Tian on 6/13/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct FSKitExpApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /FSKitExp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSSystemExtensionUsageDescriptionKey 6 | Activate FS Extension 7 | 8 | 9 | -------------------------------------------------------------------------------- /FSKitExp/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /FSKitExp/ViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewModel.swift 3 | // FSKitExp 4 | // 5 | // Created by Khaos Tian on 6/13/24. 6 | // 7 | 8 | import Foundation 9 | import FSKit 10 | import Observation 11 | 12 | @Observable 13 | @MainActor 14 | final class ViewModel { 15 | 16 | private var client: FSClient? 17 | private(set) var modules: [FSModuleIdentity] = [] 18 | 19 | init() { 20 | client = FSClient.shared 21 | client?.fetchInstalledExtensions { modules, errors in 22 | if let modules { 23 | self.modules = modules 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /FSKitExpExtension/Constants.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Constants.swift 3 | // FSKitExp 4 | // 5 | // Created by Khaos Tian on 3/30/25. 6 | // 7 | 8 | import Foundation 9 | 10 | enum Constants { 11 | 12 | static let containerIdentifier: UUID = UUID(uuidString: "8E055EB2-12FD-4EB8-A315-C082CBCFBDD3")! 13 | static let volumeIdentifier: UUID = UUID(uuidString: "CDCB994E-677C-482B-B1D2-E7BC1E07546E")! 14 | } 15 | -------------------------------------------------------------------------------- /FSKitExpExtension/FSKitExpExtension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.developer.fskit.fsmodule 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /FSKitExpExtension/FSKitExpExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FSKitExpExtension.swift 3 | // FSKitExpExtension 4 | // 5 | // Created by Khaos Tian on 3/30/25. 6 | // 7 | 8 | import Foundation 9 | import FSKit 10 | 11 | @main 12 | struct FSKitExpExtension : UnaryFileSystemExtension { 13 | 14 | var fileSystem : FSUnaryFileSystem & FSUnaryFileSystemOperations { 15 | MyFS() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /FSKitExpExtension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | EXAppExtensionAttributes 6 | 7 | EXExtensionPointIdentifier 8 | com.apple.fskit.fsmodule 9 | FSActivateOptionSyntax 10 | 11 | shortOptions 12 | g:m:o:u: 13 | 14 | FSCheckOptionSyntax 15 | 16 | shortOptions 17 | nqy 18 | 19 | FSFormatOptionSyntax 20 | 21 | shortOptions 22 | v 23 | 24 | FSMediaTypes 25 | 26 | FSPersonalities 27 | 28 | FSKitExpExtensionPersonality 29 | 30 | FSName 31 | MyFS 32 | FSfileObjectsAreCaseSensitive 33 | 34 | 35 | 36 | FSRequiresSecurityScopedPathURLResources 37 | 38 | FSShortName 39 | MyFS 40 | FSSupportsBlockResources 41 | 42 | FSSupportsGenericURLResources 43 | 44 | FSSupportsPathURLs 45 | 46 | FSSupportsServerURLs 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /FSKitExpExtension/MyFS.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MyFS.swift 3 | // FSKitExp 4 | // 5 | // Created by Khaos Tian on 3/30/25. 6 | // 7 | 8 | import Foundation 9 | import FSKit 10 | import os 11 | 12 | final class MyFS: FSUnaryFileSystem, FSUnaryFileSystemOperations { 13 | 14 | private let logger = Logger(subsystem: "FSKitExp", category: "MyFS") 15 | 16 | func probeResource( 17 | resource: FSResource, 18 | replyHandler: @escaping (FSProbeResult?, (any Error)?) -> Void 19 | ) { 20 | logger.debug("probeResource: \(resource, privacy: .public)") 21 | 22 | replyHandler( 23 | FSProbeResult.usable( 24 | name: "Test1", 25 | containerID: FSContainerIdentifier(uuid: Constants.containerIdentifier) 26 | ), 27 | nil 28 | ) 29 | } 30 | 31 | func loadResource( 32 | resource: FSResource, 33 | options: FSTaskOptions, 34 | replyHandler: @escaping (FSVolume?, (any Error)?) -> Void 35 | ) { 36 | containerStatus = .ready 37 | logger.debug("loadResource: \(resource, privacy: .public)") 38 | replyHandler( 39 | MyFSVolume(resource: resource), 40 | nil 41 | ) 42 | } 43 | 44 | func unloadResource( 45 | resource: FSResource, 46 | options: FSTaskOptions, 47 | replyHandler reply: @escaping ((any Error)?) -> Void 48 | ) { 49 | logger.debug("unloadResource: \(resource, privacy: .public)") 50 | reply(nil) 51 | } 52 | 53 | func didFinishLoading() { 54 | logger.debug("didFinishLoading") 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /FSKitExpExtension/MyFSItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MyFSItem.swift 3 | // FSKitExp 4 | // 5 | // Created by Khaos Tian on 3/30/25. 6 | // 7 | 8 | import Foundation 9 | import FSKit 10 | 11 | final class MyFSItem: FSItem { 12 | 13 | private static var id: UInt64 = FSItem.Identifier.rootDirectory.rawValue + 1 14 | static func getNextID() -> UInt64 { 15 | let current = id 16 | id += 1 17 | return current 18 | } 19 | 20 | let name: FSFileName 21 | let id = MyFSItem.getNextID() 22 | 23 | var attributes = FSItem.Attributes() 24 | var xattrs: [FSFileName: Data] = [:] 25 | var data: Data? 26 | 27 | private(set) var children: [FSFileName: MyFSItem] = [:] 28 | 29 | init(name: FSFileName) { 30 | self.name = name 31 | attributes.fileID = FSItem.Identifier(rawValue: id) ?? .invalid 32 | attributes.size = 0 33 | attributes.allocSize = 0 34 | attributes.flags = 0 35 | 36 | var timespec = timespec() 37 | timespec_get(×pec, TIME_UTC) 38 | 39 | attributes.addedTime = timespec 40 | attributes.birthTime = timespec 41 | attributes.changeTime = timespec 42 | attributes.modifyTime = timespec 43 | attributes.accessTime = timespec 44 | } 45 | 46 | func addItem(_ item: MyFSItem) { 47 | children[item.name] = item 48 | } 49 | 50 | func removeItem(_ item: MyFSItem) { 51 | children[item.name] = nil 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /FSKitExpExtension/MyFSVolume.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MyFSVolume.swift 3 | // FSKitExp 4 | // 5 | // Created by Khaos Tian on 3/30/25. 6 | // 7 | 8 | import Foundation 9 | import FSKit 10 | import os 11 | 12 | final class MyFSVolume: FSVolume { 13 | 14 | private let resource: FSResource 15 | 16 | private let logger = Logger(subsystem: "FSKitExp", category: "MyFSVolume") 17 | 18 | private let root: MyFSItem = { 19 | let item = MyFSItem(name: FSFileName(string: "/")) 20 | item.attributes.parentID = .parentOfRoot 21 | item.attributes.fileID = .rootDirectory 22 | item.attributes.uid = 0 23 | item.attributes.gid = 0 24 | item.attributes.linkCount = 1 25 | item.attributes.type = .directory 26 | item.attributes.mode = UInt32(S_IFDIR | 0b111_000_000) 27 | item.attributes.allocSize = 1 28 | item.attributes.size = 1 29 | return item 30 | }() 31 | 32 | init(resource: FSResource) { 33 | self.resource = resource 34 | 35 | super.init( 36 | volumeID: FSVolume.Identifier(uuid: Constants.volumeIdentifier), 37 | volumeName: FSFileName(string: "Test1") 38 | ) 39 | } 40 | } 41 | 42 | extension MyFSVolume: FSVolume.PathConfOperations { 43 | 44 | var maximumLinkCount: Int { 45 | return -1 46 | } 47 | 48 | var maximumNameLength: Int { 49 | return -1 50 | } 51 | 52 | var restrictsOwnershipChanges: Bool { 53 | return false 54 | } 55 | 56 | var truncatesLongNames: Bool { 57 | return false 58 | } 59 | 60 | var maximumXattrSize: Int { 61 | return Int.max 62 | } 63 | 64 | var maximumFileSize: UInt64 { 65 | return UInt64.max 66 | } 67 | } 68 | 69 | extension MyFSVolume: FSVolume.Operations { 70 | 71 | var supportedVolumeCapabilities: FSVolume.SupportedCapabilities { 72 | logger.debug("supportedVolumeCapabilities") 73 | 74 | let capabilities = FSVolume.SupportedCapabilities() 75 | capabilities.supportsHardLinks = true 76 | capabilities.supportsSymbolicLinks = true 77 | capabilities.supportsPersistentObjectIDs = true 78 | capabilities.doesNotSupportVolumeSizes = true 79 | capabilities.supportsHiddenFiles = true 80 | capabilities.supports64BitObjectIDs = true 81 | capabilities.caseFormat = .insensitiveCasePreserving 82 | return capabilities 83 | } 84 | 85 | var volumeStatistics: FSStatFSResult { 86 | logger.debug("volumeStatistics") 87 | 88 | let result = FSStatFSResult(fileSystemTypeName: "MyFS") 89 | 90 | result.blockSize = 1024000 91 | result.ioSize = 1024000 92 | result.totalBlocks = 1024000 93 | result.availableBlocks = 1024000 94 | result.freeBlocks = 1024000 95 | result.totalFiles = 1024000 96 | result.freeFiles = 1024000 97 | 98 | return result 99 | } 100 | 101 | 102 | func activate(options: FSTaskOptions) async throws -> FSItem { 103 | logger.debug("activate") 104 | return root 105 | } 106 | 107 | func deactivate(options: FSDeactivateOptions = []) async throws { 108 | logger.debug("deactivate") 109 | } 110 | 111 | func mount(options: FSTaskOptions) async throws { 112 | logger.debug("mount") 113 | } 114 | 115 | func unmount() async { 116 | logger.debug("unmount") 117 | } 118 | 119 | func synchronize(flags: FSSyncFlags) async throws { 120 | logger.debug("synchronize") 121 | } 122 | 123 | func attributes( 124 | _ desiredAttributes: FSItem.GetAttributesRequest, 125 | of item: FSItem 126 | ) async throws -> FSItem.Attributes { 127 | if let item = item as? MyFSItem { 128 | logger.debug("getItemAttributes1: \(item.name), \(desiredAttributes)") 129 | return item.attributes 130 | } else { 131 | logger.debug("getItemAttributes2: \(item), \(desiredAttributes)") 132 | throw fs_errorForPOSIXError(POSIXError.EIO.rawValue) 133 | } 134 | } 135 | 136 | func setAttributes( 137 | _ newAttributes: FSItem.SetAttributesRequest, 138 | on item: FSItem 139 | ) async throws -> FSItem.Attributes { 140 | logger.debug("setItemAttributes: \(item), \(newAttributes)") 141 | if let item = item as? MyFSItem { 142 | mergeAttributes(item.attributes, request: newAttributes) 143 | return item.attributes 144 | } else { 145 | throw fs_errorForPOSIXError(POSIXError.EIO.rawValue) 146 | } 147 | } 148 | 149 | func lookupItem( 150 | named name: FSFileName, 151 | inDirectory directory: FSItem 152 | ) async throws -> (FSItem, FSFileName) { 153 | logger.debug("lookupName: \(String(describing: name.string)), \(directory)") 154 | 155 | guard let directory = directory as? MyFSItem else { 156 | throw fs_errorForPOSIXError(POSIXError.ENOENT.rawValue) 157 | } 158 | 159 | if let item = directory.children[name] { 160 | return (item, name) 161 | } else { 162 | throw fs_errorForPOSIXError(POSIXError.ENOENT.rawValue) 163 | } 164 | } 165 | 166 | func reclaimItem(_ item: FSItem) async throws { 167 | logger.debug("reclaimItem: \(item)") 168 | } 169 | 170 | func readSymbolicLink( 171 | _ item: FSItem 172 | ) async throws -> FSFileName { 173 | logger.debug("readSymbolicLink: \(item)") 174 | throw fs_errorForPOSIXError(POSIXError.EIO.rawValue) 175 | } 176 | 177 | func createItem( 178 | named name: FSFileName, 179 | type: FSItem.ItemType, 180 | inDirectory directory: FSItem, 181 | attributes newAttributes: FSItem.SetAttributesRequest 182 | ) async throws -> (FSItem, FSFileName) { 183 | logger.debug("createItem: \(String(describing: name.string)) - \(newAttributes.mode)") 184 | 185 | guard let directory = directory as? MyFSItem else { 186 | throw fs_errorForPOSIXError(POSIXError.EIO.rawValue) 187 | } 188 | 189 | let item = MyFSItem(name: name) 190 | mergeAttributes(item.attributes, request: newAttributes) 191 | item.attributes.parentID = directory.attributes.fileID 192 | item.attributes.type = type 193 | directory.addItem(item) 194 | 195 | return (item, name) 196 | } 197 | 198 | func createSymbolicLink( 199 | named name: FSFileName, 200 | inDirectory directory: FSItem, 201 | attributes newAttributes: FSItem.SetAttributesRequest, 202 | linkContents contents: FSFileName 203 | ) async throws -> (FSItem, FSFileName) { 204 | logger.debug("createSymbolicLink: \(name)") 205 | throw fs_errorForPOSIXError(POSIXError.EIO.rawValue) 206 | } 207 | 208 | func createLink( 209 | to item: FSItem, 210 | named name: FSFileName, 211 | inDirectory directory: FSItem 212 | ) async throws -> FSFileName { 213 | logger.debug("createLink: \(name)") 214 | throw fs_errorForPOSIXError(POSIXError.EIO.rawValue) 215 | } 216 | 217 | func removeItem( 218 | _ item: FSItem, 219 | named name: FSFileName, 220 | fromDirectory directory: FSItem 221 | ) async throws { 222 | logger.debug("remove: \(name)") 223 | if let item = item as? MyFSItem, let directory = directory as? MyFSItem { 224 | directory.removeItem(item) 225 | } else { 226 | throw fs_errorForPOSIXError(POSIXError.EIO.rawValue) 227 | } 228 | } 229 | 230 | func renameItem( 231 | _ item: FSItem, 232 | inDirectory sourceDirectory: FSItem, 233 | named sourceName: FSFileName, 234 | to destinationName: FSFileName, 235 | inDirectory destinationDirectory: FSItem, 236 | overItem: FSItem? 237 | ) async throws -> FSFileName { 238 | logger.debug("rename: \(item)") 239 | throw fs_errorForPOSIXError(POSIXError.EIO.rawValue) 240 | } 241 | 242 | func enumerateDirectory( 243 | _ directory: FSItem, 244 | startingAt cookie: FSDirectoryCookie, 245 | verifier: FSDirectoryVerifier, 246 | attributes: FSItem.GetAttributesRequest?, 247 | packer: FSDirectoryEntryPacker 248 | ) async throws -> FSDirectoryVerifier { 249 | logger.debug("enumerateDirectory: \(directory)") 250 | 251 | guard let directory = directory as? MyFSItem else { 252 | throw fs_errorForPOSIXError(POSIXError.ENOENT.rawValue) 253 | } 254 | 255 | logger.debug("- enumerateDirectory - \(directory.name)") 256 | 257 | for (idx, item) in directory.children.values.enumerated() { 258 | let isLast = (idx == directory.children.count - 1) 259 | 260 | let v = packer.packEntry( 261 | name: item.name, 262 | itemType: item.attributes.type, 263 | itemID: item.attributes.fileID, 264 | nextCookie: FSDirectoryCookie(UInt64(idx)), 265 | attributes: attributes != nil ? item.attributes : nil 266 | ) 267 | 268 | logger.debug("-- V: \(v) - \(item.name)") 269 | } 270 | 271 | return FSDirectoryVerifier(0) 272 | } 273 | 274 | private func mergeAttributes(_ existing: FSItem.Attributes, request: FSItem.SetAttributesRequest) { 275 | if request.isValid(FSItem.Attribute.uid) { 276 | existing.uid = request.uid 277 | } 278 | 279 | if request.isValid(FSItem.Attribute.gid) { 280 | existing.gid = request.gid 281 | } 282 | 283 | if request.isValid(FSItem.Attribute.type) { 284 | existing.type = request.type 285 | } 286 | 287 | if request.isValid(FSItem.Attribute.mode) { 288 | existing.mode = request.mode 289 | } 290 | 291 | if request.isValid(FSItem.Attribute.linkCount) { 292 | existing.linkCount = request.linkCount 293 | } 294 | 295 | if request.isValid(FSItem.Attribute.flags) { 296 | existing.flags = request.flags 297 | } 298 | 299 | if request.isValid(FSItem.Attribute.size) { 300 | existing.size = request.size 301 | } 302 | 303 | if request.isValid(FSItem.Attribute.allocSize) { 304 | existing.allocSize = request.allocSize 305 | } 306 | 307 | if request.isValid(FSItem.Attribute.fileID) { 308 | existing.fileID = request.fileID 309 | } 310 | 311 | if request.isValid(FSItem.Attribute.parentID) { 312 | existing.parentID = request.parentID 313 | } 314 | 315 | if request.isValid(FSItem.Attribute.accessTime) { 316 | let timespec = timespec() 317 | request.accessTime = timespec 318 | existing.accessTime = timespec 319 | } 320 | 321 | if request.isValid(FSItem.Attribute.changeTime) { 322 | let timespec = timespec() 323 | request.changeTime = timespec 324 | existing.changeTime = timespec 325 | } 326 | 327 | if request.isValid(FSItem.Attribute.modifyTime) { 328 | let timespec = timespec() 329 | request.modifyTime = timespec 330 | existing.modifyTime = timespec 331 | } 332 | 333 | if request.isValid(FSItem.Attribute.addedTime) { 334 | let timespec = timespec() 335 | request.addedTime = timespec 336 | existing.addedTime = timespec 337 | } 338 | 339 | if request.isValid(FSItem.Attribute.birthTime) { 340 | let timespec = timespec() 341 | request.birthTime = timespec 342 | existing.birthTime = timespec 343 | } 344 | 345 | if request.isValid(FSItem.Attribute.backupTime) { 346 | let timespec = timespec() 347 | request.backupTime = timespec 348 | existing.backupTime = timespec 349 | } 350 | } 351 | } 352 | 353 | extension MyFSVolume: FSVolume.OpenCloseOperations { 354 | 355 | func openItem(_ item: FSItem, modes: FSVolume.OpenModes) async throws { 356 | if let item = item as? MyFSItem { 357 | logger.debug("open: \(item.name)") 358 | } else { 359 | logger.debug("open: \(item)") 360 | } 361 | } 362 | 363 | func closeItem(_ item: FSItem, modes: FSVolume.OpenModes) async throws { 364 | if let item = item as? MyFSItem { 365 | logger.debug("close: \(item.name)") 366 | } else { 367 | logger.debug("close: \(item)") 368 | } 369 | } 370 | } 371 | 372 | extension MyFSVolume: FSVolume.XattrOperations { 373 | 374 | func xattr(named name: FSFileName, of item: FSItem) async throws -> Data { 375 | logger.debug("xattr: \(item) - \(name.string ?? "NA")") 376 | 377 | if let item = item as? MyFSItem { 378 | return item.xattrs[name] ?? Data() 379 | } else { 380 | return Data() 381 | } 382 | } 383 | 384 | func setXattr(named name: FSFileName, to value: Data?, on item: FSItem, policy: FSVolume.SetXattrPolicy) async throws { 385 | logger.debug("setXattrOf: \(item)") 386 | 387 | if let item = item as? MyFSItem { 388 | item.xattrs[name] = value 389 | } 390 | } 391 | 392 | func xattrs(of item: FSItem) async throws -> [FSFileName] { 393 | logger.debug("listXattrs: \(item)") 394 | 395 | if let item = item as? MyFSItem { 396 | return Array(item.xattrs.keys) 397 | } else { 398 | return [] 399 | } 400 | } 401 | } 402 | 403 | extension MyFSVolume: FSVolume.ReadWriteOperations { 404 | 405 | func read(from item: FSItem, at offset: off_t, length: Int, into buffer: FSMutableFileDataBuffer) async throws -> Int { 406 | logger.debug("read: \(item)") 407 | 408 | var bytesRead = 0 409 | 410 | if let item = item as? MyFSItem, let data = item.data { 411 | bytesRead = data.withUnsafeBytes { (ptr: UnsafeRawBufferPointer) in 412 | let length = min(buffer.length, data.count) 413 | _ = buffer.withUnsafeMutableBytes { dst in 414 | memcpy(dst.baseAddress, ptr.baseAddress, length) 415 | } 416 | return length 417 | } 418 | } 419 | 420 | return bytesRead 421 | } 422 | 423 | func write(contents: Data, to item: FSItem, at offset: off_t) async throws -> Int { 424 | logger.debug("write: \(item) - \(offset)") 425 | 426 | if let item = item as? MyFSItem { 427 | logger.debug("- write: \(item.name)") 428 | item.data = contents 429 | item.attributes.size = UInt64(contents.count) 430 | item.attributes.allocSize = UInt64(contents.count) 431 | } 432 | 433 | return contents.count 434 | } 435 | } 436 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FSKit Sample 2 | 3 | FSKit is the new framework introduced in macOS Sequoia 15.4 that enables the developer to provide custom filesystem support from user space. The document is almost non-existent at the moment so here is a sample project to show how to use the framework. 4 | 5 | `UnaryFilesystemExtension` is the entry point of your custom filesystem. The implementation should return an instance of your custom filesystem implementation. 6 | 7 | The filesystem should be a subclass of `FSUnaryFileSystem` and conforms to necessary protocols, specifically `FSUnaryFileSystemOperations` as the system invokes that when deciding if the custom FS should be used, and get the volume from the extension. 8 | 9 | From there, you can create your own subclass of `FSVolume` to help manage your volume and conform to `FSVolume.Operations` to support the basic volume specific operations. For a fully functional volume implementation, you’ll probably need to conform to most of the `FSVolume.*Operations`. 10 | 11 | Once you build and run the app, enable the File System extension under `System Settings -> General -> Login Items & Extensions -> File System Extensions`. After that you should be able to mount the FS with something like these (`disk18` is a block device) 12 | 13 | ``` 14 | mkdir /tmp/TestVol 15 | mount -F -t MyFS disk18 /tmp/TestVol 16 | ``` 17 | 18 | And unmount them with 19 | 20 | ``` 21 | umount /tmp/TestVol 22 | ``` 23 | 24 | To create a dummy block device to test this, you can do the following 25 | 26 | ``` 27 | mkfile -n 100m dummy // create a dummy file 28 | hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount dummy // mount the newly created file as a raw block device 29 | ``` 30 | 31 | and then use it with your FS. 32 | --------------------------------------------------------------------------------