SharedPreferencesProtectedRegistry class

Protected files registry using SharedPreferences

Features:

  • Tracks files protected from cleanup
  • Stores external file path mappings
  • Key format: 'protected_files' (set of filenames)
  • External paths: 'external_paths' (map of filename -> path)
Implemented types

Constructors

SharedPreferencesProtectedRegistry.new({Future<SharedPreferences> prefsProvider()?})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearAll() Future<void>
Clears all protections
override
getExternalPath(String filename) Future<String?>
Gets the external path for a filename
override
getProtectedFiles() Future<List<String>>
Gets all protected files
override
isProtected(String filename) Future<bool>
Checks if a file is protected
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
protect(String filename) Future<void>
Marks a file as protected from cleanup
override
registerExternalPath(String filename, String externalPath) Future<void>
Registers an external file path mapping
override
toString() String
A string representation of this object.
inherited
unprotect(String filename) Future<void>
Removes protection from a file
override

Operators

operator ==(Object other) bool
The equality operator.
inherited