This sub-module provides access to the current location set configuration settings in the system's dynamic store.
| Signature | hs.network.configuration.open() -> storeObject |
|---|---|
| Type | Constructor |
| Description |
Opens a session to the dynamic store maintained by the System Configuration server. |
| Parameters |
|
| Returns |
|
| Source | extensions/network/libnetwork_configuration.m line 48 |
| Signature | hs.network.configuration:computerName() -> name, encoding |
|---|---|
| Type | Method |
| Description |
Returns the name of the computer as specified in the Sharing Preferences, and its string encoding |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/network/libnetwork_configuration.m line 194 |
| Signature | hs.network.configuration:consoleUser() -> name, uid, gid |
|---|---|
| Type | Method |
| Description |
Returns the name of the user currently logged into the system, including the users id and primary group id |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/network/libnetwork_configuration.m line 245 |
| Signature | hs.network.configuration:contents([keys], [pattern]) -> table |
|---|---|
| Type | Method |
| Description |
Return the contents of the store for the specified keys or keys matching the specified pattern(s) |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/network/libnetwork_configuration.m line 86 |
| Signature | hs.network.configuration:dhcpInfo([serviceID]) -> table |
|---|---|
| Type | Method |
| Description |
Return the DHCP information for the specified service or the primary service if no parameter is specified. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/network/libnetwork_configuration.m line 161 |
| Signature | hs.network.configuration:hostname() -> name |
|---|---|
| Type | Method |
| Description |
Returns the current local host name for the computer |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/network/libnetwork_configuration.m line 278 |
| Signature | hs.network.configuration:keys([keypattern]) -> table |
|---|---|
| Type | Method |
| Description |
Return the keys in the dynamic store which match the specified pattern |
| Parameters |
|
| Returns |
|
| Source | extensions/network/libnetwork_configuration.m line 136 |
| Signature | hs.network.configuration:location() -> location |
|---|---|
| Type | Method |
| Description |
Returns the current location identifier |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/network/libnetwork_configuration.m line 397 |
| Signature | hs.network.configuration:locations() -> table |
|---|---|
| Type | Method |
| Description |
Returns all configured locations |
| Parameters |
|
| Returns |
|
| Source | extensions/network/libnetwork_configuration.m line 425 |
| Signature | hs.network.configuration:monitorKeys([keys], [pattern]) -> storeObject |
|---|---|
| Type | Method |
| Description |
Specify the key(s) or key pattern(s) to monitor for changes. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/network/libnetwork_configuration.m line 572 |
| Signature | hs.network.configuration:proxies() -> table |
|---|---|
| Type | Method |
| Description |
Returns information about the currently active proxies, if any |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/network/libnetwork_configuration.m line 461 |
| Signature | hs.network.configuration:setCallback(function) -> storeObject |
|---|---|
| Type | Method |
| Description |
Set or remove the callback function for a store object |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/network/libnetwork_configuration.m line 488 |
| Signature | hs.network.configuration:setLocation(location) -> boolean |
|---|---|
| Type | Method |
| Description |
Switches to a new location |
| Parameters |
|
| Returns |
|
| Source | extensions/network/libnetwork_configuration.m line 316 |
| Signature | hs.network.configuration:start() -> storeObject |
|---|---|
| Type | Method |
| Description |
Starts watching the store object for changes to the monitored keys and invokes the callback function (if any) when a change occurs. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/network/libnetwork_configuration.m line 523 |
| Signature | hs.network.configuration:stop() -> storeObject |
|---|---|
| Type | Method |
| Description |
Stops watching the store object for changes. |
| Parameters |
|
| Returns |
|
| Source | extensions/network/libnetwork_configuration.m line 550 |
© 2014–2017 Hammerspoon contributors
Licensed under the MIT License.
https://www.hammerspoon.org/docs/hs.network.configuration.html