File System Module Root Resolver
FileSystemModuleRootResolver is a ModuleRootResolver used for accessing a ModuleRoot from the local file system.
Author
Richard Arriaga
Parameters
The name of the module root.
The URI that identifies the location of the ModuleRoot.
The FileManager used to manage the files accessed via this FileSystemModuleRootResolver.
Constructors
Construct a FileSystemModuleRootResolver.
Types
FileSystemWatcher manages the WatchService responsible for watching the local file system directories of the ModuleRoots loaded into the AvailRuntime.
Functions
Close this ModuleRootResolver. Should be called at shutdown to ensure proper clean up of any open resources.
Delete the ResourceType linked to the qualified name. If the ResourceType is a ResourceType.PACKAGE or a ResourceType.DIRECTORY, all of its children should be deleted as well. All deleted references should be removed from the reference tree.
Asynchronously execute the provided task.
Answer a AbstractFileWrapper for the targeted file.
Answer a ModuleNameResolver.ModuleNameResolutionResult when attempting to locate a module in this ModuleRootResolver.
Answer the URI for a resource in the source moduleRoot given a qualified name. There is no guarantee the target exists.
Answer a qualified name for the given URI that points to a file in the moduleRoot.
Answer the ResolverReference for the given qualified file name for a a file in moduleRoot.
Provide the non-nullResolverReference that represents the moduleRoot. There is no guarantee made by this interface as to how this should be run. It can be all executed on the calling thread or it can be executed on a separate thread.
Provide the ResolverReference for the given qualified file name for a file in moduleRoot.
Answer all the ResolverReferences known by this ModuleRootResolver that have a qualified name that matches the supplied abbreviation.
Specifically refresh the ResolverReference mutable state:
Specifically refresh the ResolverReference.digest in the Repository.ModuleArchive for the most recent ResolverReference.lastModified timestamp. This also refreshes the metrics (mutable state) of the provided ResolverReference. It should refresh:
Connect to the source of the moduleRoot and populate this resolver with all the ResolverReferences from the module root. This is not required nor expected to be executed in the calling thread.
Answer the ResolverReference for the given absolute Path.
Provide the full list of all ResolverReferences in this ModuleRootResolver.
Subscribe to receive notifications of WatchEventTypes occurring to this ModuleRoot.
Remove a watch subscription.
Properties
The FileManager used for pooling I/O requests for this root.
The ModuleRoot this ModuleRootResolver resolves to.
The Map from a UUID that represents an interested party to a lambda that accepts a WatchEventType that describes the event that occurred at the source location and a ResolverReference that identifies to what the event occurred to.