Method: CmdPanelWidget#update_caption
- Defined in:
- lib/unixcmd/panel.rb
#update_caption ⇒ Object
122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/unixcmd/panel.rb', line 122 def update_caption path = @dir.path..to_s mount_point = Sys::Filesystem.mount_point path stat = Sys::Filesystem.stat mount_point capacity = stat.blocks*stat.block_size free = stat.blocks_free*stat.block_size @caption.set_text(sprintf("%s of %s free", free.to_i.to_szstr, capacity.to_i.to_szstr)) @caption.reload_mounts @caption.update_mount_point mount_point end |