[[!meta copyright="Copyright © 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2009 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] [[!meta title="dir_lookup"]] routine dir_lookup ( start_dir: file_t; RPT file_name: string_t; flags: int; mode: mode_t; out do_retry: retry_type; out retry_name: string_t; out result: mach_port_send_t); Translate a file name, following all symlinks. Upon return, if `do_retry` is `FS_RETRY_MAGICAL` then `retry_name` specifies what to do, the list of possibilities is documented in ``; if `FS_RETRY_REAUTH`, then `result` should be reauthenticated before being used. If `retry_name` is the empty string and the retry type is `FS_RETRY_NORMAL`, then no further [[`dir_lookup`|dir_lookup]] calls are required; `result` is the port to use. Otherwise the [[`dir_lookup`|dir_lookup]] call should be repeated, sent to `result` (or the reauthenticated port) with `retry_name` passed for `file_name`. This call is required to be supported by all files (even non-directories) if the filename is null, and should function in that case as a re-open of the file.