feat: add fswatch, sysinfo, and udp demo scripts plus reorder manual sidebar links
Add three new example scripts demonstrating the fswatch, sysinfo, and udp modules with file watching, system metrics, and UDP echo server/client patterns. Reorder the manual API sidebar navigation to list modules alphabetically, removing deprecated entries like websocket, tls, net, json, regex, jinja, os, signal, subprocess, sqlite, and timer while adding argparse, dataset, fswatch, and html.
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