40 lines
891 B
Plaintext
Executable File
40 lines
891 B
Plaintext
Executable File
|
|
source /mod/webif/lib/setup
|
|
require lock system.class ts.class pretty_size browse.class \
|
|
safe_delete settings.class plugin queue.class
|
|
|
|
proc elapsed {start} {
|
|
return $(([clock milliseconds] - $start) / 1000.0)
|
|
}
|
|
|
|
proc startclock {} {
|
|
set ::startclock_s [clock milliseconds]
|
|
}
|
|
|
|
proc endclock {size} {
|
|
set el [elapsed $::startclock_s]
|
|
set rate $($size / $el)
|
|
return "[pretty_size $size] in $el seconds - [pretty_size $rate]/s"
|
|
}
|
|
|
|
proc register {args} {}
|
|
|
|
proc scan_run {dir flag callback} {
|
|
global dustbin
|
|
|
|
if {[string match {\[*} [file tail $dir]]} return
|
|
|
|
if {[file exists "$dir/.$flag"]} { $callback $dir }
|
|
|
|
foreach entry [readdir -nocomplain $dir] {
|
|
if {[file isdirectory "$dir/$entry"]} {
|
|
scan_run "$dir/$entry" $flag $callback
|
|
}
|
|
}
|
|
}
|
|
|
|
set root [system mediaroot]
|
|
|
|
source /mod/webif/plugin/detectads/detectads.jim
|
|
|