# UnixFileSystem.FileInformation

Import: `import com.install4j.api.unix.UnixFileSystem;`

```java
static interface FileInformation
```

Holds Unix-specific information about a file.

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getMode()`](#getmode) | `int` | Get the Unix mode of a file. |
| [`getOwnerInfo()`](#getownerinfo) | `String` | Get the owner of a file. |
| [`isLink()`](#islink) | `boolean` | Return whether the file is a link or not. |
| [`getLinkTarget()`](#getlinktarget) | `String` | If `isLink` returns `true`, this method returns the target file of the link. |

### getMode()

```java
int getMode()
```

Get the Unix mode of a file. To convert this mode to a human-readable octal string, use
`Integer.toOctalString`.


**Returns:** the Unix mode

### getOwnerInfo()

```java
String getOwnerInfo()
```

Get the owner of a file. This is a user name followed by a colon and a group name, like "user:group".


**Returns:** the owner of the file.

### isLink()

```java
boolean isLink()
```

Return whether the file is a link or not.


**Returns:** `true` if the file is a link, `false` otherwise.

### getLinkTarget()

```java
String getLinkTarget()
```

If `isLink` returns `true`, this method returns the target file of the link.


**Returns:** the target file if the file is a link or `null` otherwise.

**See also:**

- [FileInformation.isLink](UnixFileSystem.FileInformation.md#islink)

