source: project/wiki/filesystem @ 8865

Last change on this file since 8865 was 8865, checked in by svnwiki, 12 years ago

Changes applied for Ozzi Lee (71.38.23.88) through svnwiki:

File size: 2.9 KB
Line 
1== filesystem
2
3[[toc:]]
4
5=== Description
6
7filesystem uses
8
9=== Requirements
10
11Requires the [[statvfs]] egg.
12
13=== Author
14
15[[Ozzi Lee]]
16
17=== Download
18
19[[http://www.call-with-current-continuation.org/eggs/filesystem.egg|filesystem.egg]]
20
21=== Documentation
22
23; <procedure>(filesystem:block-size PATH)</procedure> : Returns the size of a block on the filesystem at PATH.
24
25; <procedure>(filesystem:blocks-total PATH)</procedure> : Returns the total number of blocks on the filesystem at PATH.
26
27; <procedure>(filesystem:blocks-free PATH)</procedure> : Returns the number of free blocks on the filesystem at PATH.
28
29; <procedure>(filesystem:blocks-available PATH)</procedure> : Returns the number of blocks available to non-root users on the filesystem at PATH.
30
31; <procedure>(filesystem:blocks->bytes BLOCKSIZE BLOCKS UNITS)</procedure> : Converts blocks to bytes, given the size of a block, the number of blocks, and a number representing the unit size, i.e. 1000 for kilobytes, 1024 for kibibytes.
32
33; <procedure>(filesystem:blocks->kilobytes BLOCKSIZE BLOCKS EXPONENT)</procedure> : Converts blocks to (kilo/mega/giga)bytes given the size of a block, the number of blocks, and an exponent representing the exponent on the unit size, i.e 1 for kilobytes, 2 for megabytes, 3 for gigabtyes, etc.
34
35; <procedure>(filesystem:blocks->kibibytes BLOCKSIZE BLOCKS EXPONENT)</procedure> : Converts blocks to (kibi/mebi/gibi)bytes, given the size of a block, the number of blocks, and an exponent representing the exponent on the unit size, i.e. 1 for kibibytes, 2 for mebibytes, 3 for gibigytes, etc.
36
37=== Example
38
39The following would return the (rounded) number for gigabytes available on "/".
40
41  (filesystem:blocks->kilobytes (filesystem:block-size "/") (filesystem:blocks-available "/") 3)
42
43=== Changelog
44
45* 1.0.1 - Dealing with bugfix in [[statvfs]]
46* 1.0
47
48=== License
49
50  ;; Copyright (c) 2008 Ozzi Lee
51 
52  ;; Permission is hereby granted, free of charge, to any person
53  ;; obtaining a copy of this software and associated documentation
54  ;; files (the "Software"), to deal in the Software without
55  ;; restriction, including without limitation the rights to use,
56  ;; copy, modify, merge, publish, distribute, sublicense, and/or sell
57  ;; copies of the Software, and to permit persons to whom the
58  ;; Software is furnished to do so, subject to the following
59  ;; conditions:
60 
61  ;; The above copyright notice and this permission notice shall be
62  ;; included in all copies or substantial portions of the Software.
63 
64  ;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
65  ;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
66  ;; OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
67  ;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
68  ;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
69  ;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
70  ;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
71  ;; OTHER DEALINGS IN THE SOFTWARE.
72
Note: See TracBrowser for help on using the repository browser.