Package com.tnsai.quality.sandbox
Record Class FsMount
java.lang.Object
java.lang.Record
com.tnsai.quality.sandbox.FsMount
- Record Components:
hostPath- source path on the hostsandboxPath- target path inside the sandboxreadOnly-true= sandbox cannot mutate the host files;false= sandbox writes propagate back to the host
Filesystem mount point for a sandbox (TNS-296). Maps a host path
into the sandbox's filesystem at
sandboxPath.
readOnly defaults to true on the mount factory
methods because read-only is the safer default — code running in
the sandbox must not be able to corrupt the host filesystem unless
the caller explicitly says otherwise.
- Since:
- 0.10.0 (TNS-296)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.hostPath()Returns the value of thehostPathrecord component.booleanreadOnly()Returns the value of thereadOnlyrecord component.static FsMountRead-only mount — the safer default.static FsMountRead-write mount — sandbox writes propagate back to the host.Returns the value of thesandboxPathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FsMount
Creates an instance of aFsMountrecord class.- Parameters:
hostPath- the value for thehostPathrecord componentsandboxPath- the value for thesandboxPathrecord componentreadOnly- the value for thereadOnlyrecord component
-
-
Method Details
-
readOnly
Read-only mount — the safer default. -
readWrite
Read-write mount — sandbox writes propagate back to the host. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
hostPath
Returns the value of thehostPathrecord component.- Returns:
- the value of the
hostPathrecord component
-
sandboxPath
Returns the value of thesandboxPathrecord component.- Returns:
- the value of the
sandboxPathrecord component
-
readOnly
public boolean readOnly()Returns the value of thereadOnlyrecord component.- Returns:
- the value of the
readOnlyrecord component
-