Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/mergesort/Bodega. A simple store for all your basic needs, and a foundational data layer primitive build.ms/bodega/docs
Something went wrong. Try again.
1{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"actor"},{"kind":"text","text":" "},{"kind":"identifier","text":"DiskStorageEngine"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine"},{"type":"text","text":" prioritizes simplicity over speed, it is very easy to use and understand."},{"type":"text","text":" "},{"type":"text","text":"A "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine"},{"type":"text","text":" will write a one file for every object you save, which makes"},{"type":"text","text":" "},{"type":"text","text":"it easy to inspect and debug any objects you’re saving."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Initialization times vary based on the total number of objects you have saved,"},{"type":"text","text":" "},{"type":"text","text":"but a simple rule of thumb is that loading 1,000 objects from disk takes about 0.25 seconds."},{"type":"text","text":" "},{"type":"text","text":"This can start to feel a bit slow if you are saving more than 2,000-3,000, at which point"},{"type":"text","text":" "},{"type":"text","text":"it may be worth investigating alternative "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/StorageEngine"},{"type":"text","text":"s."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If performance is important "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega"},{"type":"text","text":" ships "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/SQLiteStorageEngine"},{"type":"text","text":", and that is the recommended"},{"type":"text","text":" "},{"type":"text","text":"default "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/StorageEngine"},{"type":"text","text":". If you have your own persistence layer such as Realm, Core Data, etc,"},{"type":"text","text":" "},{"type":"text","text":"you can easily build your own "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/StorageEngine"},{"type":"text","text":" to plug into "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/ObjectStorage"},{"type":"text","text":"."}]}]}],"schemaVersion":{"major":0,"minor":2,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/bodega\/diskstorageengine"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Bodega\/documentation\/Bodega\/StorageEngine","doc:\/\/Bodega\/s8SendableP","doc:\/\/Bodega\/ScA"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/StorageEngine"},{"type":"text","text":" based on saving items to the file system."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"DiskStorageEngine"}],"title":"DiskStorageEngine","roleHeading":"Class","role":"symbol","symbolKind":"class","externalID":"s:6Bodega17DiskStorageEngineC","modules":[{"name":"Bodega"}],"navigatorTitle":[{"kind":"identifier","text":"DiskStorageEngine"}]},"hierarchy":{"paths":[["doc:\/\/Bodega\/documentation\/Bodega"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/init(directory:)"]},{"title":"Instance Methods","identifiers":["doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/allKeys()","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/createdAt(key:)","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/keyCount()","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/keyExists(_:)","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/lastAccessed(key:)","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/read(key:)","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/readAllData()","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/readAllDataAndKeys()","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/readDataAndKeys(keys:)","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/remove(key:)","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/removeAllData()","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/updatedAt(key:)","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/write(_:)","doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/write(_:key:)"]},{"title":"Default Implementations","identifiers":["doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/StorageEngine-Implementations"],"generated":true}],"references":{"doc://Bodega/documentation/Bodega/DiskStorageEngine/readAllData()":{"role":"symbol","title":"readAllData()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"readAllData"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"},{"kind":"text","text":" -> ["},{"kind":"typeIdentifier","text":"Data","preciseIdentifier":"s:10Foundation4DataV"},{"kind":"text","text":"]"}],"abstract":[{"type":"text","text":"Reads all the "},{"type":"codeVoice","code":"[Data]"},{"type":"text","text":" located in the "},{"type":"codeVoice","code":"directory"},{"type":"text","text":"."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/readAllData()","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/readalldata()"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/remove(key:)":{"role":"symbol","title":"remove(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"remove"},{"kind":"text","text":"("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CacheKey","preciseIdentifier":"s:6Bodega8CacheKeyV"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"}],"abstract":[{"type":"text","text":"Removes "},{"type":"codeVoice","code":"Data"},{"type":"text","text":" from disk based on the associated "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey"},{"type":"text","text":"."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/remove(key:)","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/remove(key:)"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/keyCount()":{"role":"symbol","title":"keyCount()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"keyCount"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"abstract":[{"type":"text","text":"Iterates through a directory to find the total number of "},{"type":"codeVoice","code":"Data"},{"type":"text","text":" items."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/keyCount()","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/keycount()"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/keyExists(_:)":{"role":"symbol","title":"keyExists(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"keyExists"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"CacheKey","preciseIdentifier":"s:6Bodega8CacheKeyV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[{"type":"text","text":"Checks whether a value with a key is persisted."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/keyExists(_:)","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/keyexists(_:)"},"doc://Bodega/documentation/Bodega/CacheKey":{"role":"symbol","title":"CacheKey","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"CacheKey"}],"abstract":[{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey"},{"type":"text","text":" is a type meant to provide a stable storage key."},{"type":"text","text":" "},{"type":"text","text":"If initialized from a URL the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey"},{"type":"text","text":" value will generate"},{"type":"text","text":" "},{"type":"text","text":"a consistent UUID-formatted MD5 version of the URL string as the key"},{"type":"text","text":" "},{"type":"text","text":"to ensure it is file system safe."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"CacheKey"}],"url":"\/documentation\/bodega\/cachekey"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/updatedAt(key:)":{"role":"symbol","title":"updatedAt(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"updatedAt"},{"kind":"text","text":"("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CacheKey","preciseIdentifier":"s:6Bodega8CacheKeyV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Date","preciseIdentifier":"s:10Foundation4DateV"},{"kind":"text","text":"?"}],"abstract":[{"type":"text","text":"Returns the updatedAt date for the file represented by the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey"},{"type":"text","text":", if it exists."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/updatedAt(key:)","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/updatedat(key:)"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/write(_:)":{"role":"symbol","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"write"},{"kind":"text","text":"([(key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CacheKey","preciseIdentifier":"s:6Bodega8CacheKeyV"},{"kind":"text","text":", data"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Data","preciseIdentifier":"s:10Foundation4DataV"},{"kind":"text","text":")]) "},{"kind":"keyword","text":"throws"}],"abstract":[{"type":"text","text":"Writes an array of "},{"type":"codeVoice","code":"Data"},{"type":"text","text":" items to disk based on the associated "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey"},{"type":"text","text":" passed in the tuple."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/write(_:)","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/write(_:)"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/StorageEngine-Implementations":{"role":"collectionGroup","title":"StorageEngine Implementations","abstract":[],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/StorageEngine-Implementations","kind":"article","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/storageengine-implementations"},"doc://Bodega/ScA":{"type":"unresolvable","title":"_Concurrency.Actor","identifier":"doc:\/\/Bodega\/ScA"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/allKeys()":{"role":"symbol","title":"allKeys()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"allKeys"},{"kind":"text","text":"() -> ["},{"kind":"typeIdentifier","text":"CacheKey","preciseIdentifier":"s:6Bodega8CacheKeyV"},{"kind":"text","text":"]"}],"abstract":[{"type":"text","text":"Iterates through a "},{"type":"codeVoice","code":"directory"},{"type":"text","text":" to find all of the keys."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/allKeys()","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/allkeys()"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/readDataAndKeys(keys:)":{"role":"symbol","title":"readDataAndKeys(keys:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"readDataAndKeys"},{"kind":"text","text":"("},{"kind":"externalParam","text":"keys"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"CacheKey","preciseIdentifier":"s:6Bodega8CacheKeyV"},{"kind":"text","text":"]) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" -> [(key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CacheKey","preciseIdentifier":"s:6Bodega8CacheKeyV"},{"kind":"text","text":", data"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Data","preciseIdentifier":"s:10Foundation4DataV"},{"kind":"text","text":")]"}],"abstract":[{"type":"text","text":"Reads "},{"type":"codeVoice","code":"Data"},{"type":"text","text":" from disk based on the associated array of "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey"},{"type":"text","text":"s provided as a parameter"},{"type":"text","text":" "},{"type":"text","text":"and returns an array "},{"type":"codeVoice","code":"[(CacheKey, Data)]"},{"type":"text","text":" associated with the passed in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey"},{"type":"text","text":"s."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/readDataAndKeys(keys:)","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/readdataandkeys(keys:)"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/read(key:)":{"role":"symbol","title":"read(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"read"},{"kind":"text","text":"("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CacheKey","preciseIdentifier":"s:6Bodega8CacheKeyV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Data","preciseIdentifier":"s:10Foundation4DataV"},{"kind":"text","text":"?"}],"abstract":[{"type":"text","text":"Reads "},{"type":"codeVoice","code":"Data"},{"type":"text","text":" from disk based on the associated "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey"},{"type":"text","text":"."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/read(key:)","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/read(key:)"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/lastAccessed(key:)":{"role":"symbol","title":"lastAccessed(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lastAccessed"},{"kind":"text","text":"("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CacheKey","preciseIdentifier":"s:6Bodega8CacheKeyV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Date","preciseIdentifier":"s:10Foundation4DateV"},{"kind":"text","text":"?"}],"abstract":[{"type":"text","text":"Returns the last access date of the file for the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey"},{"type":"text","text":", if it exists."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/lastAccessed(key:)","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/lastaccessed(key:)"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/removeAllData()":{"role":"symbol","title":"removeAllData()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"removeAllData"},{"kind":"text","text":"() "},{"kind":"keyword","text":"throws"}],"abstract":[{"type":"text","text":"Removes all the "},{"type":"codeVoice","code":"Data"},{"type":"text","text":" items located in the "},{"type":"codeVoice","code":"directory"},{"type":"text","text":"."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/removeAllData()","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/removealldata()"},"doc://Bodega/s8SendableP":{"type":"unresolvable","title":"Swift.Sendable","identifier":"doc:\/\/Bodega\/s8SendableP"},"doc://Bodega/documentation/Bodega":{"role":"collection","title":"Bodega","abstract":[{"type":"text","text":"A simple store all your basic needs, and also so much more. 🐱"}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega","kind":"symbol","type":"topic","url":"\/documentation\/bodega"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/write(_:key:)":{"role":"symbol","title":"write(_:key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"write"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Data","preciseIdentifier":"s:10Foundation4DataV"},{"kind":"text","text":", "},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CacheKey","preciseIdentifier":"s:6Bodega8CacheKeyV"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"}],"abstract":[{"type":"text","text":"Writes "},{"type":"codeVoice","code":"Data"},{"type":"text","text":" to disk based on the associated "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey"},{"type":"text","text":"."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/write(_:key:)","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/write(_:key:)"},"doc://Bodega/documentation/Bodega/StorageEngine":{"role":"symbol","title":"StorageEngine","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"StorageEngine"}],"abstract":[{"type":"text","text":"A "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/StorageEngine"},{"type":"text","text":" represents a data storage mechanism for saving and persisting data."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/StorageEngine","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"StorageEngine"}],"url":"\/documentation\/bodega\/storageengine"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/readAllDataAndKeys()":{"role":"symbol","title":"readAllDataAndKeys()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"readAllDataAndKeys"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"},{"kind":"text","text":" -> [(key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CacheKey","preciseIdentifier":"s:6Bodega8CacheKeyV"},{"kind":"text","text":", data"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Data","preciseIdentifier":"s:10Foundation4DataV"},{"kind":"text","text":")]"}],"abstract":[{"type":"text","text":"Reads all the "},{"type":"codeVoice","code":"Data"},{"type":"text","text":" located in the "},{"type":"codeVoice","code":"directory"},{"type":"text","text":" and returns an array"},{"type":"text","text":" "},{"type":"text","text":"of "},{"type":"codeVoice","code":"[(CacheKey, Data)]"},{"type":"text","text":" tuples associated with the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey"},{"type":"text","text":"."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/readAllDataAndKeys()","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/readalldataandkeys()"},"doc://Bodega/documentation/Bodega/SQLiteStorageEngine":{"role":"symbol","title":"SQLiteStorageEngine","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"SQLiteStorageEngine"}],"abstract":[{"type":"text","text":"A "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/StorageEngine"},{"type":"text","text":" based on an SQLite database."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/SQLiteStorageEngine","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SQLiteStorageEngine"}],"url":"\/documentation\/bodega\/sqlitestorageengine"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/init(directory:)":{"role":"symbol","title":"init(directory:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"directory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FileManager","preciseIdentifier":"c:objc(cs)NSFileManager"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Directory","preciseIdentifier":"s:So13NSFileManagerC6BodegaE9DirectoryV"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Initializes a new "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine"},{"type":"text","text":" for persisting "},{"type":"codeVoice","code":"Data"},{"type":"text","text":" to disk."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/init(directory:)","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/init(directory:)"},"doc://Bodega/documentation/Bodega/DiskStorageEngine":{"role":"symbol","title":"DiskStorageEngine","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"DiskStorageEngine"}],"abstract":[{"type":"text","text":"A "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/StorageEngine"},{"type":"text","text":" based on saving items to the file system."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"DiskStorageEngine"}],"url":"\/documentation\/bodega\/diskstorageengine"},"doc://Bodega/documentation/Bodega/ObjectStorage":{"role":"symbol","title":"ObjectStorage","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ObjectStorage"}],"abstract":[{"type":"text","text":"A unified layer over a "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/StorageEngine"},{"type":"text","text":" primitives, allowing you to read, write, and save Swift objects."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/ObjectStorage","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ObjectStorage"}],"url":"\/documentation\/bodega\/objectstorage"},"doc://Bodega/documentation/Bodega/DiskStorageEngine/createdAt(key:)":{"role":"symbol","title":"createdAt(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"createdAt"},{"kind":"text","text":"("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CacheKey","preciseIdentifier":"s:6Bodega8CacheKeyV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Date","preciseIdentifier":"s:10Foundation4DateV"},{"kind":"text","text":"?"}],"abstract":[{"type":"text","text":"Returns the date of creation for the file represented by the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/CacheKey"},{"type":"text","text":", if it exists."}],"identifier":"doc:\/\/Bodega\/documentation\/Bodega\/DiskStorageEngine\/createdAt(key:)","kind":"symbol","type":"topic","url":"\/documentation\/bodega\/diskstorageengine\/createdat(key:)"}}}