pike.git / lib / modules / System.pmod

version» Context lines:

pike.git/lib/modules/System.pmod:31:   }      //! Get the full path for the current user's home directory   //!   //! @returns   //! the full path to the current user's home directory, or zero   //! if the appropriate environment variables have not been set.   //!   //! @note   //! This method uses the standard environment variables for - //! various systems to determine the home directory.string get_home() + //! various systems to determine the home directory. + string get_home()   {    string home = [string]getenv("HOME");    if(home) return home;      #if __NT__    string homedrive = [string]getenv("HOMEDRIVE");    home = [string]getenv("HOMEPATH");    if(homedrive)    home = combine_path(homedrive + "\\", (home || "\\"));    if(home) return home;   #endif       return 0;   }