@@ -4,7 +4,7 @@ use namespace HH\Lib\Str;
4
4
use namespace HH\Lib\Experimental\File ;
5
5
6
6
final class File extends Node {
7
- public function getReadHandle (): File \NonDisposableReadHandle {
7
+ public function getReadHandle (): File \CloseableReadHandle {
8
8
$this -> isAvailable();
9
9
$this -> isReadable();
10
10
@@ -24,7 +24,7 @@ final class File extends Node {
24
24
25
25
public function getWriteHandle (
26
26
File \WriteMode $mode = File \WriteMode :: OPEN_OR_CREATE ,
27
- ): File \NonDisposableWriteHandle {
27
+ ): File \CloseableWriteHandle {
28
28
if ($mode === File \WriteMode :: MUST_CREATE && $this -> exists()) {
29
29
throw new Exception \ExistingNodeException (Str \format (
30
30
' Cannot re-create file (%s) for writing.' ,
@@ -69,7 +69,7 @@ final class File extends Node {
69
69
70
70
public function getReadWriteHandle (
71
71
File \WriteMode $mode = File \WriteMode :: OPEN_OR_CREATE ,
72
- ): File \NonDisposableReadWriteHandle {
72
+ ): File \CloseableReadWriteHandle {
73
73
if ($mode === File \WriteMode :: MUST_CREATE && $this -> exists()) {
74
74
throw new Exception \ExistingNodeException (Str \format (
75
75
' Cannot re-create file (%s) for writing.' ,
0 commit comments