< prev index next >

src/jdk.jpackage/windows/native/libjpackage/SysInfo.h

Print this page




  44      */
  45     tstring getTempDir();
  46 
  47     /**
  48      * Returns absolute path to the process executable.
  49      */
  50     tstring getProcessModulePath();
  51 
  52     /**
  53      * Returns absolute path to the current executable module.
  54      */
  55     tstring getCurrentModulePath();
  56 
  57     enum CommandArgProgramNameMode {
  58         IncludeProgramName,
  59         ExcludeProgramName
  60     };
  61     /**
  62      * Retrieves the command-line arguments for the current process.
  63      * With IncludeProgramName option returns result similar to argv/argc.
  64      * With ExcludeProgramName option program name (the 1st element of command line)

  65      * is excluded.
  66      */
  67     tstring_array getCommandArgs(CommandArgProgramNameMode progNameMode = ExcludeProgramName);

  68 
  69     /**
  70      * Returns value of environment variable with the given name.
  71      * Throws exception if variable is not set or any other error occurred
  72      * reading the value.
  73      */
  74     tstring getEnvVariable(const tstring& name);
  75 
  76     /**
  77      * Returns value of environment variable with the given name.
  78      * Returns value of 'defValue' parameter if variable is not set or any
  79      * other error occurred reading the value.
  80      */
  81     tstring getEnvVariable(const std::nothrow_t&, const tstring& name,
  82                                             const tstring& defValue=tstring());
  83 
  84     /**
  85      * Returns 'true' if environment variable with the given name is set.
  86      */
  87     bool isEnvVariableSet(const tstring& name);


  44      */
  45     tstring getTempDir();
  46 
  47     /**
  48      * Returns absolute path to the process executable.
  49      */
  50     tstring getProcessModulePath();
  51 
  52     /**
  53      * Returns absolute path to the current executable module.
  54      */
  55     tstring getCurrentModulePath();
  56 
  57     enum CommandArgProgramNameMode {
  58         IncludeProgramName,
  59         ExcludeProgramName
  60     };
  61     /**
  62      * Retrieves the command-line arguments for the current process.
  63      * With IncludeProgramName option returns result similar to argv/argc.
  64      * With ExcludeProgramName option program name
  65      *  (the 1st element of command line)
  66      * is excluded.
  67      */
  68     tstring_array getCommandArgs(
  69             CommandArgProgramNameMode progNameMode = ExcludeProgramName);
  70 
  71     /**
  72      * Returns value of environment variable with the given name.
  73      * Throws exception if variable is not set or any other error occurred
  74      * reading the value.
  75      */
  76     tstring getEnvVariable(const tstring& name);
  77 
  78     /**
  79      * Returns value of environment variable with the given name.
  80      * Returns value of 'defValue' parameter if variable is not set or any
  81      * other error occurred reading the value.
  82      */
  83     tstring getEnvVariable(const std::nothrow_t&, const tstring& name,
  84             const tstring& defValue=tstring());
  85 
  86     /**
  87      * Returns 'true' if environment variable with the given name is set.
  88      */
  89     bool isEnvVariableSet(const tstring& name);
< prev index next >