On this page:
2.1 Paths
2.1.1 File  Path
Extension
File  Path
Rel  File  Path
Abs  File  Path
make-File  Path
make-Abs  File  Path
make-Rel  File  Path
make-Extension
2.2 Network
2.2.1 Interface
interface-mac-address
named-interfaces
6.3.90.900

2 System

2.1 Paths

2.1.1 FilePath

 (require grip/system/filepath) package: grip
Constants
Data structures.

struct

(struct Extension (x))

  x : String
A file extension. No validation is performed.

struct

(struct FilePath (p))

  p : String
A general *nix system path. May be a relative or absolute path. A path to a directory or a file resource.

A relative FilePath, a file path that does not start with a ’/’.

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.