Package com.usatiuk.dhfsfs.objects

# Record Class File

java.lang.Object
java.lang.Record
com.usatiuk.dhfsfs.objects.File

Record Components:
  `key` - unique key
  `mode` - file mode
  `cTime` - creation time
  `mTime` - modification time
  `symlink` - true if the file is a symlink, false otherwise

All Implemented Interfaces:
  `JMapHolder<JMapLongKey>`, `JDataRemote`, `JData`, `Serializable`

public record File(JObjectKey key, long mode, long cTime, long mTime, boolean symlink) extends Record implements JDataRemote, JMapHolder<JMapLongKey>
File is a data structure that represents a file in the file system

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`File(JObjectKey key, long mode, long cTime, long mTime, boolean symlink)`
Creates an instance of a `File` record class.

## Method Summary

Modifier and Type
Method
Description
`Collection<JObjectKey>`
`collectRefsTo()`
`long`
`cTime()`
Returns the value of the `cTime` record component.
`Class<? extends JDataRemoteDto>`
`dtoClass()`
`final boolean`
`equals(Object o)`
Indicates whether some other object is "equal to" this one.
`int`
`estimateSize()`
`final int`
`hashCode()`
Returns a hash code value for this object.
`JObjectKey`
`key()`
Returns the value of the `key` record component.
`long`
`mode()`
Returns the value of the `mode` record component.
`long`
`mTime()`
Returns the value of the `mTime` record component.
`boolean`
`symlink()`
Returns the value of the `symlink` record component.
`final String`
`toString()`
Returns a string representation of this record class.
`File`
`withCTime(long cTime)`
`File`
`withCurrentMTime()`
`File`
`withMode(long mode)`
`File`
`withMTime(long mTime)`
`File`
`withSymlink(boolean symlink)`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### File

public File(JObjectKey key, long mode, long cTime, long mTime, boolean symlink)
Creates an instance of a `File` record class.

Parameters:
  `key` - the value for the `key` record component
  `mode` - the value for the `mode` record component
  `cTime` - the value for the `cTime` record component
  `mTime` - the value for the `mTime` record component
  `symlink` - the value for the `symlink` record component

## Method Details

### withSymlink

public File withSymlink(boolean symlink)

### withMode

public File withMode(long mode)

### withCTime

public File withCTime(long cTime)

### withMTime

public File withMTime(long mTime)

### withCurrentMTime

public File withCurrentMTime()

### collectRefsTo

public Collection<JObjectKey> collectRefsTo()

Specified by:
  `collectRefsTo` in interface `JDataRemote`

### estimateSize

public int estimateSize()

Specified by:
  `estimateSize` in interface `JData`
Specified by:
  `estimateSize` in interface `JDataRemote`

### dtoClass

public Class<? extends JDataRemoteDto> dtoClass()

Specified by:
  `dtoClass` in interface `JDataRemote`

### toString

public final String 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.

Specified by:
  `toString` in class `Record`
Returns:
  a string representation of this object

### 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.

Specified by:
  `hashCode` in class `Record`
Returns:
  a hash code value for this object

### equals

public final boolean equals(Object o)
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 with `Objects::equals(Object,Object)`; primitive components are compared with '=='.

Specified by:
  `equals` in class `Record`
Parameters:
  `o` - the object with which to compare
Returns:
  `true` if this object is the same as the `o` argument; `false` otherwise.

### key

public JObjectKey key()
Returns the value of the `key` record component.

Specified by:
  `key` in interface `JData`
Specified by:
  `key` in interface `JDataRemote`
Returns:
  the value of the `key` record component

### mode

public long mode()
Returns the value of the `mode` record component.

Returns:
  the value of the `mode` record component

### cTime

public long cTime()
Returns the value of the `cTime` record component.

Returns:
  the value of the `cTime` record component

### mTime

public long mTime()
Returns the value of the `mTime` record component.

Returns:
  the value of the `mTime` record component

### symlink

public boolean symlink()
Returns the value of the `symlink` record component.

Returns:
  the value of the `symlink` record component