Java Resource File getSampleDir(File resourcesDir)

Here you can find the source of getSampleDir(File resourcesDir)

Description

get Sample Dir

License

Open Source License

Declaration

protected synchronized static File getSampleDir(File resourcesDir) 

Method Source Code

//package com.java2s;
/*/*from  ww  w  .  j  a va  2s  .  c o  m*/
 * @(#)StrokeHelper.java
 *
 * $Date: 2014-06-06 20:04:49 +0200 (Fr, 06 Jun 2014) $
 *
 * Copyright (c) 2014 by Jeremy Wood.
 * All rights reserved.
 *
 * The copyright of this software is owned by Jeremy Wood. 
 * You may not use, copy or modify this software, except in  
 * accordance with the license agreement you entered into with  
 * Jeremy Wood. For details see accompanying license terms.
 * 
 * This software is probably, but not necessarily, discussed here:
 * https://javagraphics.java.net/
 * 
 * That site should also contain the most recent official version
 * of this software.  (See the SVN repository for more details.)
 */

import java.io.File;

public class Main {
    protected synchronized static File getSampleDir(File resourcesDir) {
        File file = new File(resourcesDir, "strokes");
        if ((!file.exists()) && (!file.mkdirs()))
            throw new RuntimeException("mkdirs failed for " + file.getAbsolutePath());
        return file;
    }
}

Related

  1. getInputStream(String resourceOrFile, Class cls)
  2. getInputStreamForResource(String s)
  3. getLastModificationForResource(String resourceId)
  4. getLastModified(final String resourceName)
  5. getParentResource(final Class c, final String resource)
  6. getShortName(String resource, Map nsMap)
  7. getSourceForResource(String s)
  8. getStreamFromResource(Class clazz, String resourceName)
  9. getTestResourceFile(String pName, Class pClass)