DartleCache class

The cache used by dartle to figure out when files change between checks, typically between two builds.

It is a cache-based cache - it does not cache the contents of files or directories, it only associates a cache to them so that it can tell whether their contents have changed between two checks in a very efficient manner.

Available extensions

Constructors

DartleCache(String rootDir)
Create an instance of DartleCache at the given root directory.

Properties

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

Methods

cacheTaskInvocation(String taskName, [List<String> args = const []]) Future<void>
Cache the given task invocation.
call(FileCollection collection, {String key = ''}) Future<void>
Cache all files and directories in the given collection.
clean({String key = ''}) Future<void>
Clean the Dartle cache.
contains(FileSystemEntity entity, {String key = ''}) bool
Check if the given file system entity is present in the cache.
findChanges(FileCollection fileCollection, {String key = ''}) Stream<FileChange>
Find all changes if a FileCollection has been modified since the last time someone checked with this method.
getExecutablesLocation(File file) File
Get a location for storing an executable file created from the given file.
getLatestInvocationTime(String taskName) Future<DateTime?>
Get the DateTime when this task was last invoked successfully.
hasChanged(FileCollection fileCollection, {String key = ''}) Future<bool>
Check if any member of a FileCollection has been modified since the last time someone checked with this method.
hasTask(String taskName) Future<bool>
Check if a task invocation with the given name has been cached before.
hasTaskInvocationChanged(String taskName, [List<String> args = const []]) Future<bool>
Check if the given task had been invoked with the same arguments before.
init() → void
Initialize the cache directories.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(FileCollection collection, {String key = ''}) Future<void>
Remove from this cache all files and directories in the given collection.
removeNotMatching(Set<String> taskNames, Set<String> keys) Future<void>
Remove any cache entry that is not relevant given the remaining taskNames and keys.
removeTaskInvocation(String taskName) Future<void>
Remove any previous invocations of a task with the given name from the cache.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance DartleCache
Get the default DartleCache instance. May initialize the default cache directory at .dartle_tool.
no setter