From eee454074e4b90e75c2811673cd3e1be9570bd4c Mon Sep 17 00:00:00 2001 From: Apprentice-Alchemist <53486764+Apprentice-Alchemist@users.noreply.github.com> Date: Tue, 18 Jun 2024 13:54:34 +0200 Subject: [PATCH] Delete sys.fs.Permissions --- std/sys/fs/File.hx | 1 - std/sys/fs/Fs.hx | 1 - std/sys/fs/Metadata.hx | 1 - std/sys/fs/Permissions.hx | 9 --------- std/sys/net/TcpStream.hx | 6 ++++++ 5 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 std/sys/fs/Permissions.hx diff --git a/std/sys/fs/File.hx b/std/sys/fs/File.hx index 44aa62eeee1..717c9b1288f 100644 --- a/std/sys/fs/File.hx +++ b/std/sys/fs/File.hx @@ -28,7 +28,6 @@ extern class File { function syncAll():Void; function syncData():Void; function metadata():Metadata; - function setPermissions(perm:Permissions):Void; // TODO: technically these should all use a Int64 or even uint64 type, but `haxe.io.Bytes` uses an int length, so... function read(bytes:haxe.io.Bytes, bufferOffset:Int, bufferLength:Int):Int; diff --git a/std/sys/fs/Fs.hx b/std/sys/fs/Fs.hx index 8ec21f23f6c..fb00eab6a51 100644 --- a/std/sys/fs/Fs.hx +++ b/std/sys/fs/Fs.hx @@ -9,7 +9,6 @@ extern class Fs { Returns the metadata for `path` without following symlinks. **/ static function symlinkMetadata(path:Path):Metadata; - static function setPermissions(path:Path, perm:Permissions):Void; static function copy(from:Path, to:Path):Void; static function rename(from:Path, to:Path):Void; static function readDir(path:Path):Iterator; diff --git a/std/sys/fs/Metadata.hx b/std/sys/fs/Metadata.hx index 23b10e93a37..d99689121ca 100644 --- a/std/sys/fs/Metadata.hx +++ b/std/sys/fs/Metadata.hx @@ -6,7 +6,6 @@ extern class Metadata { function isFile():Bool; function isSymlink():Bool; function size():haxe.Int64; - function permissions():Permissions; function modified():Null; function accessed():Null; function created():Null; diff --git a/std/sys/fs/Permissions.hx b/std/sys/fs/Permissions.hx deleted file mode 100644 index 65b729f78d5..00000000000 --- a/std/sys/fs/Permissions.hx +++ /dev/null @@ -1,9 +0,0 @@ -package sys.fs; - -@:coreApi -extern class Permissions { - /** - Note that this does not affect the file, use `Fs.setPermissions`. - **/ - var readonly(get, set):Bool; -} \ No newline at end of file diff --git a/std/sys/net/TcpStream.hx b/std/sys/net/TcpStream.hx index 2a38b09ab70..19c4c106244 100644 --- a/std/sys/net/TcpStream.hx +++ b/std/sys/net/TcpStream.hx @@ -4,6 +4,12 @@ import haxe.time.Duration; // TODO: docs +#if available(feature = "new_tcp_api") + +#end + +@:experimental(feature = "new_tcp_api") +@:stable(feature = "new_tcp_api", since = "5.0.0") @:coreApi extern class TcpStream { static function connect(address:SocketAddress, ?timeout:Duration):TcpStream;