Update.
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// retoor <retoor@molodetz.nl>
|
||||
|
||||
import "pathlib" for Path
|
||||
|
||||
var testFile = Path.new("/tmp/test_pathlib_size.txt")
|
||||
var content = "12345678"
|
||||
testFile.writeText(content)
|
||||
|
||||
var size = testFile.size()
|
||||
System.print(size) // expect: 8
|
||||
|
||||
testFile.unlink()
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// retoor <retoor@molodetz.nl>
|
||||
|
||||
import "pathlib" for Path
|
||||
|
||||
var testFile = Path.new("/tmp/test_pathlib_stat_times.txt")
|
||||
testFile.writeText("test content")
|
||||
|
||||
var mtime = testFile.mtime()
|
||||
var atime = testFile.atime()
|
||||
var ctime = testFile.ctime()
|
||||
|
||||
System.print(mtime is Num) // expect: true
|
||||
System.print(atime is Num) // expect: true
|
||||
System.print(ctime is Num) // expect: true
|
||||
System.print(mtime > 0) // expect: true
|
||||
System.print(atime > 0) // expect: true
|
||||
System.print(ctime > 0) // expect: true
|
||||
|
||||
testFile.unlink()
|
||||
Reference in New Issue
Block a user