# Print an `object' on the standard output (`stdout') and add a newline.
protected meth print(object: Object)
do
- if object != null then
- stdout.write(object.to_s)
- end
+ stdout.write(object.to_s)
stdout.write("\n")
end
class FStream
special IOS
special NativeFileCapable
-
# The path of the file.
- readable attr _path: String = null
+ readable attr _path: nullable String = null
# The FILE *.
- attr _file: NativeFile = null
+ attr _file: nullable NativeFile = null
meth file_stat: FileStat
do return _file.file_stat end
meth mkdir
do
var dirs = self.split_with("/")
- var path = new String
+ var path = new Buffer
if dirs.is_empty then return
if dirs[0].is_empty then
# it was a starting /
if d.is_empty then continue
path.append(d)
path.add('/')
- path.to_cstring.file_mkdir
+ path.to_s.to_cstring.file_mkdir
end
end
end