/** * Determine the user's home directory (location where preferences are). * <p> * This method can be expensive on the first invocation if path name * translation is required. Subsequent invocations return a cached result. * <p> * Not all platforms and JREs require path name translation. Currently only * Cygwin on Win32 requires translation of the Cygwin HOME directory. * * @return the user's home directory; null if the user does not have one. */ public File userHome() { Holder<File> p = userHome; if (p == null) { p = new Holder<File>(userHomeImpl()); userHome = p; } return p.value; }
/** * Determine the user's home directory (location where preferences are). * <p> * This method can be expensive on the first invocation if path name * translation is required. Subsequent invocations return a cached result. * <p> * Not all platforms and JREs require path name translation. Currently only * Cygwin on Win32 requires translation of the Cygwin HOME directory. * * @return the user's home directory; null if the user does not have one. */ public File userHome() { Holder<File> p = userHome; if (p == null) { p = new Holder<>(userHomeImpl()); userHome = p; } return p.value; }
/** * Get the currently used path to the system-wide Git configuration file. * * @return the currently used path to the system-wide Git configuration file * or {@code null} if none has been set. * @since 4.0 */ public File getGitSystemConfig() { if (gitSystemConfig == null) { gitSystemConfig = new Holder<>(discoverGitSystemConfig()); } return gitSystemConfig.value; }
/** * Set the path to the system-wide Git configuration file to use. * * @param configFile * the path to the config file. * @return {@code this} * @since 4.0 */ public FS setGitSystemConfig(File configFile) { gitSystemConfig = new Holder<>(configFile); return this; }
/** * Set the user's home directory location. * * @param path * the location of the user's preferences; null if there is no * home directory for the current user. * @return {@code this}. */ public FS setUserHome(File path) { userHome = new Holder<File>(path); return this; }
/** * Set the user's home directory location. * * @param path * the location of the user's preferences; null if there is no * home directory for the current user. * @return {@code this}. */ public FS setUserHome(File path) { userHome = new Holder<>(path); return this; }
/** * @return the currently used path to the system-wide Git configuration * file or {@code null} if none has been set. * @since 4.0 */ public File getGitSystemConfig() { if (gitSystemConfig == null) { gitSystemConfig = new Holder<File>(discoverGitSystemConfig()); } return gitSystemConfig.value; }
/** * Set the path to the system-wide Git configuration file to use. * * @param configFile * the path to the config file. * @return {@code this} * @since 4.0 */ public FS setGitSystemConfig(File configFile) { gitSystemConfig = new Holder<File>(configFile); return this; }
/** * Determine the user's home directory (location where preferences are). * <p> * This method can be expensive on the first invocation if path name * translation is required. Subsequent invocations return a cached result. * <p> * Not all platforms and JREs require path name translation. Currently only * Cygwin on Win32 requires translation of the Cygwin HOME directory. * * @return the user's home directory; null if the user does not have one. */ public File userHome() { Holder<File> p = userHome; if (p == null) { p = new Holder<>(userHomeImpl()); userHome = p; } return p.value; }
/** * Get the currently used path to the system-wide Git configuration file. * * @return the currently used path to the system-wide Git configuration file * or {@code null} if none has been set. * @since 4.0 */ public File getGitSystemConfig() { if (gitSystemConfig == null) { gitSystemConfig = new Holder<>(discoverGitSystemConfig()); } return gitSystemConfig.value; }
/** * Set the path to the system-wide Git configuration file to use. * * @param configFile * the path to the config file. * @return {@code this} * @since 4.0 */ public FS setGitSystemConfig(File configFile) { gitSystemConfig = new Holder<>(configFile); return this; }
/** * Set the user's home directory location. * * @param path * the location of the user's preferences; null if there is no * home directory for the current user. * @return {@code this}. */ public FS setUserHome(File path) { userHome = new Holder<>(path); return this; }