# OpenFile
<span class="source-link">[[Source]](src/files/file.md#L64)</span>

Open a File for read only.


```pony
primitive val OpenFile
```

## Constructors

### create
<span class="source-link">[[Source]](src/files/file.md#L64)</span>


```pony
new val create()
: OpenFile val^
```

#### Returns

* [OpenFile](files-OpenFile) val^

---

## Public Functions

### apply
<span class="source-link">[[Source]](src/files/file.md#L68)</span>


```pony
fun box apply(
  from: FilePath val)
: (File ref | FileOK val | FileError val | 
    FileEOF val | FileBadFileNumber val | FileExists val | 
    FilePermissionDenied val)
```
#### Parameters

*   from: [FilePath](files-FilePath) val

#### Returns

* ([File](files-File) ref | [FileOK](files-FileOK) val | [FileError](files-FileError) val | 
    [FileEOF](files-FileEOF) val | [FileBadFileNumber](files-FileBadFileNumber) val | [FileExists](files-FileExists) val | 
    [FilePermissionDenied](files-FilePermissionDenied) val)

---

### eq
<span class="source-link">[[Source]](src/files/file.md#L68)</span>


```pony
fun box eq(
  that: OpenFile val)
: Bool val
```
#### Parameters

*   that: [OpenFile](files-OpenFile) val

#### Returns

* [Bool](builtin-Bool) val

---

### ne
<span class="source-link">[[Source]](src/files/file.md#L68)</span>


```pony
fun box ne(
  that: OpenFile val)
: Bool val
```
#### Parameters

*   that: [OpenFile](files-OpenFile) val

#### Returns

* [Bool](builtin-Bool) val

---

