lib/core: Make `file_exists` a `Text` function instead of `String`
[nit.git] / lib / core / file.nit
index 23d3ce3..2405186 100644 (file)
@@ -888,12 +888,12 @@ redef class Text
        do
                for i in substrings do s.write_native(i.to_cstring, 0, i.byte_length)
        end
-end
 
-redef class String
        # return true if a file with this names exists
        fun file_exists: Bool do return to_cstring.file_exists
+end
 
+redef class String
        # The status of a file. see POSIX stat(2).
        fun file_stat: nullable FileStat
        do