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:

  • hostname is the name of the host controlling the device where aso is stored πŸ‘‘
  • the canonical_pathname is 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 string busy πŸ’€

🧚 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