resolve_file

sefun
SYNOPSIS
    string resolve_file (string file)
    string resolve_file (string file, object anchor)
    string resolve_file (string file, string anchor)

DESCRIPTION
     Resolves the filename <file> in respect to the calling object or
     the given <anchor>, may it be an object or a verbatim path.

     This means, for an anchor "/d/domain/base/obj/zardoz"
      - "/foo"        is returned as "/foo"
      - "~wizard/foo" is returned as "/players/wizard/foo"
      - "+domain/foo" is returned as "/d/domain/foo"
      - "&domain/foo" is returned as "/p/domain/foo"
      - "foo"         is returned as "/d/domain/base/obj/foo"
      - "./foo"       is returned as "/d/domain/base/obj/foo"
      - "../foo"      is returned as "/d/domain/base/foo"
     This includes all relative path designators (. and ..) being
     resolved.

     The function is automatically used for exits, items and shop
     articles.
     The variant using a string as anchor is useful for usage in tools:
     the tool can pass the wizard's P_CURRENTDIR setting as anchor,
     allowing the wizard to specify pathnames relative to his/her current
     working directory.