atnetwork(3)
β¨ atnetwork β network path handling β¨
okay bestie, welcome to atnetwork(3), straight out of the AtFS Toolkit Library π this is the page for two lil functions that deal with paths that live on the network, and honestly? they're giving very much "glue code that holds everything together" and i'm obsessed π«Ά
πΈ SYNOPSIS πΈ
#include <atfs.h>
#include <atfstk.h>
char* atNetworkPath (Af_key *aso);
char* atLocalPath (char *networkPath);
like. look at that. two functions. both returning char*. both absolute icons π
π¦ DESCRIPTION π¦
π« atNetworkPath
okay so atNetworkPath hands you a network wide unique pathname for aso β¨ and the pathname it builds has this exact structure, no cap:
<hostname>:<canonical_pathname>@<version>
let me break that down for you because it's lowkey a lot:
hostnameis the name of the host controlling the device whereasois stored π- the
canonical_pathnameis the real pathname β meaning without symbolic links β of where the object is located on that host π - the version number, including the introducing at-sign (
@), is optional π for busy versions it may be missing, or it may literally be the stringbusyπ
π§ atLocalPath
and then atLocalPath takes a network path name and maps it to a local path name π when the host information inside that network path points at a remote host, atLocalPath goes and looks up /etc/mtab to find a mapping from the network canonical pathname to a local path π΅οΈββοΈ
the resulting pathname comes back in bound notation, which looks like:
<pathname>[version]
with the version number added in brackets π«Ά and if you want, you can convert that into an ASO descriptor by calling atBindVersion (that's manual page atbind(3), iykyk) β¨
π RETURN VALUE π
both functions hand you the resulting string in static memory β which means the result gets overwritten on a subsequent call π so like, copy it if you need it, bestie, don't hold onto that pointer and act surprised later π
and on failure? a null pointer is returned. periodt.
π SEE ALSO π
π FILES π
/etc/mtab
and that's the whole page, angel π this was AtFStk-1.12, dated Fri Jun 25 16:39:40 1993 β yes she's vintage, yes she still slays, we stan a legacy toolkit πβ¨ bye bestie, go call atBindVersion responsibly πΈ
π¦ where this page comes from
- debian bookworm: atfs-dev 1.4pl6-15+b1
- ubuntu jammy: atfs-dev 1.4pl6-15
- ubuntu noble: atfs-dev 1.4pl6-16.1build1
- ubuntu resolute: atfs-dev 1.4pl6-17
- ubuntu stonking: atfs-dev 1.4pl6-17
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms