001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.spi.preferences; 003 004import java.io.File; 005 006/** 007 * Interface for a provider of certain base directory locations. 008 * <p> 009 * Depending on the OS and preferred layout, some directories may coincide. 010 * @since 12855 011 */ 012public interface IBaseDirectories { 013 014 /** 015 * Get the directory where user-specific configuration and preferences 016 * should be stored. 017 * @param createIfMissing if true, automatically creates this directory, 018 * in case it is missing 019 * @return the preferences directory 020 * @since 12856 021 */ 022 File getPreferencesDirectory(boolean createIfMissing); 023 024 /** 025 * Get the directory where user-specific data files should be stored. 026 * @param createIfMissing if true, automatically creates this directory, 027 * in case it is missing 028 * @return the user data directory 029 * @since 12856 030 */ 031 File getUserDataDirectory(boolean createIfMissing); 032 033 /** 034 * Get the directory where user-specific cached content (non-essential data) 035 * should be stored. 036 * @param createIfMissing if true, automatically creates this directory, 037 * in case it is missing 038 * @return the cache directory 039 * @since 12856 040 */ 041 File getCacheDirectory(boolean createIfMissing); 042}