congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DiskCache.makeCachePath
Code IndexAdd Tabnine to your IDE (free)

How to use
makeCachePath
method
in
ucar.nc2.util.DiskCache

Best Java code snippets using ucar.nc2.util.DiskCache.makeCachePath (Showing top 3 results out of 315)

origin: edu.ucar/netcdf

/**
 * Get a file in the cache.
 * File may or may not exist. We assume its always writeable.
 * If it does exist, set its LastModifiedDate to current time.
 *
 * @param fileLocation normal file location
 * @return equivilent File in the cache.
 */
static public File getCacheFile(String fileLocation) {
 File f = new File(makeCachePath(fileLocation));
 if (f.exists())
  f.setLastModified(System.currentTimeMillis());
 if (!checkExist) {
  File dir = f.getParentFile();
  dir.mkdirs();
  checkExist = true;
 }
 return f;
}
origin: edu.ucar/cdm

/**
 * Get a file in the cache.
 * File may or may not exist. We assume its always writeable.
 * If it does exist, set its LastModifiedDate to current time.
 *
 * @param fileLocation normal file location
 * @return equivalent File in the cache.
 */
static public File getCacheFile(String fileLocation) {
 File f = new File(makeCachePath(fileLocation));
 if (f.exists())
  f.setLastModified(System.currentTimeMillis());
 if (!checkExist) {
  File dir = f.getParentFile();
  dir.mkdirs();
  checkExist = true;
 }
 return f;
}
origin: Unidata/thredds

/**
 * Get a file in the cache.
 * File may or may not exist. We assume its always writeable.
 * If it does exist, set its LastModifiedDate to current time.
 *
 * @param fileLocation normal file location
 * @return equivalent File in the cache.
 */
static public File getCacheFile(String fileLocation) {
 File f = new File(makeCachePath(fileLocation));
 if (f.exists()) {
  if (!f.setLastModified(System.currentTimeMillis()))
   logger.warn("Failed to setLastModified on " + f.getPath());
 }
 if (!checkExist) {
  File dir = f.getParentFile();
  if (!dir.exists() && !dir.mkdirs())
   logger.warn("Failed to mkdirs on " + dir.getPath());
  checkExist = true;
 }
 return f;
}
ucar.nc2.utilDiskCachemakeCachePath

Javadoc

Make the cache filename

Popular methods of DiskCache

  • getFileStandardPolicy
    Get a File if it exists. If not, get a File that can be written to. Use the standard policy to decid
  • cleanCache
    Remove all files with date < cutoff.
  • getCacheFile
    Get a file in the cache. File may or may not exist. We assume its always writeable. If it does exist
  • getFile
    Get a File if it exists. If not, get a File that can be written to. If alwaysInCache, look only in t
  • make
    debug
  • makeRootDirectory
    Make sure that the current root directory exists.
  • setRootDirectory
    Set the cache root directory. Create it if it doesnt exist.
  • showCache

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setScale (BigDecimal)
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now