trait ResourceFolder extends Resource
This interface depicts a ResourceFile that contains other sub ResourceFile. a ResourceFolder handles a list of resources, that can be present into the folder of the current computer or into a distant folder from a distant driver.
- See also
fr.linkit.api.application.resource.RemoteResourceRepresentation
- Alphabetic
- By Inheritance
- ResourceFolder
- Resource
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def close(): Unit
- Definition Classes
- AutoCloseable
- Annotations
- @throws(classOf[java.lang.Exception])
- abstract def find[R <: Resource](name: String)(implicit arg0: ClassTag[R]): Option[R]
Tries to retrieve an Resource with the same name and kind than the ones provided.
Tries to retrieve an Resource with the same name and kind than the ones provided.
- R
the kind of resource expected.
- name
the name associated with the requested resource.
- returns
Some instance if the resource was found AND have the same kind, or None instead
- abstract def get[R <: Resource](name: String)(implicit arg0: ClassTag[R]): R
Retrieves an Resource of the name and it's representation type R.
Retrieves an Resource of the name and it's representation type R.
- R
the type of resource expected.
- name
the name associated with the requested resource.
- returns
the expected resource representation.
- Annotations
- @throws("If no resource was found with the provided name") @throws("If a resource was found but with another type than R.") @NotNull()
- Exceptions thrown
IncompatibleResourceTypeException
if a resource is not the same type of R.NoSuchResourceException
if no resource was found with the provided name.
- abstract def getChecksum: Long
- returns
The sum of every checksums of this folder. The checksum only integrate registered resources.
- Definition Classes
- ResourceFolder → Resource
- abstract def getEntry: ResourceEntry[ResourceFolder]
- Definition Classes
- ResourceFolder → Resource
- abstract def getLastChecksum: Long
- returns
The last known checksum of this resource.
- Definition Classes
- Resource
- abstract def getLastModified: Versions
Each times a resource is modified from a LinkitApplication, its ResourceVersion must be updated by the modifier application.
Each times a resource is modified from a LinkitApplication, its ResourceVersion must be updated by the modifier application. This can be useful to determine if a resource is obsolete depending on his utilisation (example: a file used by the core which have not the same Versions.engineVersion could be out of date)
- Definition Classes
- Resource
- abstract def getLocation: String
- returns
the location from the root ResourceFolder
- Definition Classes
- ResourceFolder → Resource
- abstract def getMaintainer: ResourcesMaintainer
The resources maintainer that handles this resources folder.
The resources maintainer that handles this resources folder. The way that the maintainer handles its resources registration is implementation-specific.
- returns
The resources maintainer that handles this resources folder.
- See also
- abstract def getOrOpen[R <: Resource](name: String)(implicit arg0: ClassTag[R], factory: ResourceFactory[R]): R
Retrieves or creates an Resource of the name and it's representation type R.
Retrieves or creates an Resource of the name and it's representation type R.
- R
the type of resource expected.
- name
the name associated with the requested resource.
- returns
the expected resource representation.
- Annotations
- @NotNull()
- abstract def getParent: Option[ResourceFolder]
- returns
the parent folder of this folder or null if this resource is the root folder.
- Definition Classes
- ResourceFolder → Resource
- abstract def getPath: Path
- returns
The file adapter that represent this resource on the os's File System
- Definition Classes
- Resource
- abstract def getRoot: ResourceFolder
- Definition Classes
- Resource
- Annotations
- @NotNull()
- abstract def isPresentOnDrive(name: String): Boolean
No matter if a file is registered by the maintainer or not, this method must return true if any file or folder with the provided name is stored into the handled folder.
No matter if a file is registered by the maintainer or not, this method must return true if any file or folder with the provided name is stored into the handled folder.
- name
the file/folder name to test.
- returns
true
- abstract val name: String
- Definition Classes
- Resource
- abstract def openResource[R <: Resource](name: String, factory: ResourceFactory[R])(implicit arg0: ClassTag[R]): R
Opens a resource folder located under this folder's path.
Opens a resource folder located under this folder's path.
- R
the kind of resource that must be opened.
- name
the relative path in which the resource will be stored.
- returns
an instance of R, which is the resource file.
- Annotations
- @throws("If the subPath targets a resource that is already registered.") @throws("If the provided name contains invalid character")
- Exceptions thrown
IllegalResourceException
If the provided name contains invalid character.ResourceAlreadyPresentException
if name is already registered for the resource folder.
- abstract def register[R <: Resource](name: String, factory: ResourceFactory[R]): R
Registers a resource folder.
Registers a resource folder. Be aware that the resource MUST be already stored into the handled folder. No distant resource can be registered by a distant machine.
- name
The name of the resource to register.
- Annotations
- @throws("If the provided name contains invalid character")
- Exceptions thrown
IllegalResourceException
If the provided name contains invalid character.
- abstract def unregister(name: String): Unit
Unregisters a resource.
Unregisters a resource. This method takes no effect if the provided resource's name is unknown.
- name
the resource name to unregister.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isKnown(name: String): Boolean
- See also
ResourcesMaintainer.isKnown()
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated