6.3.90.900
2 System
2.1 Paths
2.1.1 FilePath
(require grip/system/filepath) | package: grip |
Constants
Data structures.
A general *nix system path. May be a relative or absolute path. A path to a directory or a file resource.
struct
(struct RelFilePath FilePath ())
A relative FilePath, a file path that does not start with a ’/’.
struct
(struct AbsFilePath FilePath ())
An absolute FilePath, an absolute file path always starts with a ’/’.
Constructing instances of FilePath
procedure
(make-FilePath path) → FilePath
path : String
Creates a FilePath instance from a given string path. The actual
instance returned is an AbsFilePath or
RelFilePath depending on the given path string is absolute
or relative.
procedure
(make-AbsFilePath path) → AbsFilePath
path : String
Creates an AbsFilePath from the given path string. If the
provided path string is a relative path string, the path string is
made absolute by prefixing a ’/’.
procedure
(make-RelFilePath path) → RelFilePath
path : String
Creates an RelFilePath from the given path string. If the
provided path string is an absolute path string, the path string is
made relative by dropping the leading ’/’.
File name Extension.
procedure
(make-Extension extension) → Extension
extension : String
Creates an Extension from the provided string. Currently
no validation is performed.
2.2 Network
2.2.1 Interface
(require grip/system/interface) | package: grip |
procedure
(interface-mac-address name) → String
name : String
The MAC address for a named interface, e.g. eth0, wlan0, ...
procedure
(named-interfaces) → (Listof String)
The interfaces defined on the system. A listing of directory /sys/class/net.