Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-diskspace Reference Manual, version 0.3.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Thu Mar 11 12:00:27 2021 GMT+0.
• Introduction | What cl-diskspace is all about | |
• Systems | The systems documentation | |
• Modules | The modules documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
cl-diskspace is a Common Lisp feature to list disks with command line tool df
(Linux/Mac) or GetLogicalDrives
(Windows), and get disk space information using statvfs
(Unix/Linux/Mac) or GetDiskFreeSpace
(Windows), supports Unix/Linux/Mac/Windows.
Copyright (c) 2015 Muyinliu Xing Released under the ISC License.
| Common Lisp | Linux | Mac | Unix | Windows | |---------------|:-------:|:----:|:-----:|:-------:| | SBCL | Yes | Yes | | Yes |
Note: I don't have Unix system so haven't test on Unix yet.
Note: Have test in Windows XP/Windows 7/Windows 8.1/Windows 10
Note: Welcome to reply test results in other Common Lisp implements.
In shell:
git clone https://github.com/muyinliu/cl-diskspace.git
cp -r cl-diskspace ~/quicklisp/local-projects/
In Common Lisp:
(ql:quickload 'cl-diskspace)
(diskspace:list-all-disks)
Will get something like this:
("/" "/Volumes/Seagate1T")
Note: result in Mac
(diskspace:list-all-disks)
Will get something like this:
("C:\\" "D:\\")
Note: result in Windows
(diskspace:list-all-disk-info)
Will get something like this:
((:DISK "/" :TOTAL 127175917568 :FREE 16509661184 :AVAILABLE
16247517184 :USE-PERCENT 87))
(diskspace:list-all-disk-info t)
Will get something like this:
((:DISK "/" :TOTAL "118.44G" :FREE "15.38G" :AVAILABLE
"15.13G" :USE-PERCENT 87))
(diskspace:disk-space "/")
Will get something like this:
127175917568
16509661184
16247517184
Note: the total space is 118.44G, free space is 15.38G and available space is 15.13G
(diskspace:disk-space "/" t)
Will get something like this:
"118.44G"
"15.38G"
"15.13G"
(diskspace:disk-total-space "/")
Will get something like this:
127175917568
(diskspace:disk-total-space "/" t)
Will get something like this:
"118.4G"
(diskspace:disk-free-space "/")
Will get something like this:
16509661184
(diskspace:disk-free-space "/" t)
Will get something like this:
"15.38G"
(diskspace:disk-available-space "/")
Will get something like this:
16247517184
(diskspace:disk-available-space "/" t)
Will get something like this:
"15.13G"
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The cl-diskspace system |
Muyinliu Xing <muyinliu@gmail.com>
ISC
List disks, get disk total/free/usable space information.
0.3.1
cl-diskspace.asd (file)
src (module)
Modules are listed depth-first from the system components tree.
• The cl-diskspace/src module | ||
• The cl-diskspace/src/unix module |
Next: The cl-diskspace/src/unix module, Previous: Modules, Up: Modules [Contents][Index]
cl-diskspace (system)
src/
Previous: The cl-diskspace/src module, Up: Modules [Contents][Index]
utils.lisp (file)
src (module)
src/unix/
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
Next: The cl-diskspace/src/packages․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
cl-diskspace.asd
cl-diskspace (system)
Next: The cl-diskspace/src/utils․lisp file, Previous: The cl-diskspace․asd file, Up: Lisp files [Contents][Index]
src (module)
src/packages.lisp
Next: The cl-diskspace/src/unix/grovel-statvfs․lisp file, Previous: The cl-diskspace/src/packages․lisp file, Up: Lisp files [Contents][Index]
packages.lisp (file)
src (module)
src/utils.lisp
size-in-human-readable (function)
Next: The cl-diskspace/src/unix/cl-diskspace-list-all-disks-with-df․lisp file, Previous: The cl-diskspace/src/utils․lisp file, Up: Lisp files [Contents][Index]
unix (module)
src/unix/grovel-statvfs.lisp
Next: The cl-diskspace/src/unix/cl-diskspace-statvfs․lisp file, Previous: The cl-diskspace/src/unix/grovel-statvfs․lisp file, Up: Lisp files [Contents][Index]
grovel-statvfs.lisp (file)
unix (module)
src/unix/cl-diskspace-list-all-disks-with-df.lisp
list-all-disks (function)
Next: The cl-diskspace/src/common․lisp file, Previous: The cl-diskspace/src/unix/cl-diskspace-list-all-disks-with-df․lisp file, Up: Lisp files [Contents][Index]
unix (module)
src/unix/cl-diskspace-statvfs.lisp
Previous: The cl-diskspace/src/unix/cl-diskspace-statvfs․lisp file, Up: Lisp files [Contents][Index]
unix (module)
src (module)
src/common.lisp
list-all-disk-info (function)
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The cl-diskspace package |
packages.lisp (file)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported functions |
Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Disk available space.
cl-diskspace-statvfs.lisp (file)
Disk free space.
cl-diskspace-statvfs.lisp (file)
Disk space information include total/free/available space.
cl-diskspace-statvfs.lisp (file)
Disk total space.
cl-diskspace-statvfs.lisp (file)
List disk information. example result:
((:DISK "/" :TOTAL 19993329664 :FREE 6154420224 :AVAILABLE 6154420224
:USE-PERCENT 69)
(:DISK "/mnt" :TOTAL 21136445440 :FREE 2048335872 :AVAILABLE 974667776
:USE-PERCENT 95))
((:DISK "/" :TOTAL "18.62 GB" :FREE "5.73 GB" :AVAILABLE "5.73 GB" :USE-PERCENT
69)
(:DISK "/mnt" :TOTAL "19.68 GB" :FREE "1.91 GB" :AVAILABLE "929.52 MB"
:USE-PERCENT 95))
common.lisp (file)
List all physical disk use command line tool df. note: size in KB.
utils.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal constants | ||
• Internal functions | ||
• Internal classes |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-diskspace-20180131-git/src/unix/grovel-statvfs.processed-grovel-file
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-diskspace-20180131-git/src/unix/grovel-statvfs.processed-grovel-file
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-diskspace-20180131-git/src/unix/grovel-statvfs.processed-grovel-file
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-diskspace-20180131-git/src/unix/grovel-statvfs.processed-grovel-file
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-diskspace-20180131-git/src/unix/grovel-statvfs.processed-grovel-file
Next: Internal classes, Previous: Internal constants, Up: Internal definitions [Contents][Index]
cl-diskspace-statvfs.lisp (file)
cl-diskspace-statvfs.lisp (file)
Previous: Internal functions, Up: Internal definitions [Contents][Index]
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-diskspace-20180131-git/src/unix/grovel-statvfs.processed-grovel-file
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L M |
---|
Jump to: | C F L M |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
D F L S |
---|
Jump to: | %
D F L S |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | C S |
---|
Jump to: | C S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C P S |
---|
Jump to: | C P S |
---|