Przeglądaj źródła

[std] improve wording of Path.extension() docs

Now it's consistent with `withExtension()`.
Also, `dir` and `ext` are nullable.
Jens Fischer 6 lat temu
rodzic
commit
e809fb424b
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      std/haxe/io/Path.hx

+ 3 - 3
std/haxe/io/Path.hx

@@ -40,7 +40,7 @@ class Path {
 
 		If the path has no directory, the value is `null`.
 	**/
-	public var dir : String;
+	public var dir : Null<String>;
 
 	/**
 		The file name.
@@ -60,7 +60,7 @@ class Path {
 
 		If the path has no extension, the value is `null`.
 	**/
-	public var ext : String;
+	public var ext : Null<String>;
 
 	/**
 		`true` if the last directory separator is a backslash, `false` otherwise.
@@ -154,7 +154,7 @@ class Path {
 	/**
 		Returns the extension of `path`.
 
-		If the extension is `null`, the empty String `""` is returned.
+		If `path` has no extension, the empty String `""` is returned.
 
 		If `path` is `null`, the result is unspecified.
 	**/