lib/picky/backends/file/basic.rb in picky-3.1.11 vs lib/picky/backends/file/basic.rb in picky-3.1.12
- old
+ new
@@ -28,19 +28,29 @@
# file position/offset mappings.
#
@mapping_file = Memory::JSON.new "#{cache_path}.file_mapping.#{extension}"
end
+ # The default extension for index files is "index".
+ #
+ def extension
+ :index
+ end
+
# The initial content before loading.
#
- def default
+ # Note: We could also load the mapping file
+ # as in #load.
+ #
+ def initial
nil
end
- # The default extension for index files is "index".
+ # The empty index that is used for putting the index
+ # together before it is saved into the files.
#
- def extension
- :index
+ def empty
+ {}
end
# Will copy the index file to a location that
# is in a directory named "backup" right under
# the directory the index file is in.
\ No newline at end of file