Ignore:
Timestamp:
2013-09-22T16:59:52+02:00 (13 years ago)
Author:
Don-vip
Message:

see #9032, see #4029 - Allow to load session from standard I/O mechanisms (local and remote files) + javadoc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r6222 r6245  
    728728        return all.toString();
    729729    }
     730
     731    /**
     732     * Returns the JOSM temp directory.
     733     * @return The JOSM temp directory ({@code <java.io.tmpdir>/JOSM}), or {@code null} if {@code java.io.tmpdir} is not defined
     734     * @since 6245
     735     */
     736    public static File getJosmTempDir() {
     737        String tmpDir = System.getProperty("java.io.tmpdir");
     738        if (tmpDir == null) {
     739            return null;
     740        }
     741        File josmTmpDir = new File(tmpDir, "JOSM");
     742        if (!josmTmpDir.exists()) {
     743            if (!josmTmpDir.mkdirs()) {
     744                Main.warn("Unable to create temp directory "+josmTmpDir);
     745            }
     746        }
     747        return josmTmpDir;
     748    }
    730749}
Note: See TracChangeset for help on using the changeset viewer.