Tabnine Logo
FSEntryResource.create
Code IndexAdd Tabnine to your IDE (free)

How to use
create
method
in
ca.carleton.gcrc.couch.fsentry.FSEntryResource

Best Java code snippets using ca.carleton.gcrc.couch.fsentry.FSEntryResource.create (Showing top 3 results out of 315)

origin: ca.carleton.gcrc/nunaliit2-couch-client

/**
 * Creates an instance of FSEntryResource to represent an entry based on the resource
 * specified by the classLoader and resource name.
 * @param classLoader Class loader used to find the resource
 * @param resourceName Actual name of resource
 * @return An entry representing the specified resource.
 * @throws Exception Invalid request
 */
static public FSEntryResource create(ClassLoader classLoader, String resourceName) throws Exception {
  return create(null, classLoader, resourceName);
}

origin: ca.carleton.gcrc/nunaliit2-couch-client

/**
 * Create a virtual tree hierarchy with a resource supporting the leaf.
 * @param path Position of the file in the hierarchy, including its name
 * @param classLoader Class loader used to find the needed resource
 * @param resourceName Name of the actual resource to obtain using class loader
 * @return The FSEntry root for this hierarchy
 * @throws Exception Invalid parameter
 */
static public FSEntry getPositionedResource(String path, ClassLoader classLoader, String resourceName) throws Exception {
  List<String> pathFrags = FSEntrySupport.interpretPath(path);
  
  // Start at leaf and work our way back
  int index = pathFrags.size() - 1;
  FSEntry root = create(pathFrags.get(index), classLoader, resourceName);
  
  --index;
  while(index >= 0){
    FSEntryVirtualDirectory parent = new FSEntryVirtualDirectory(pathFrags.get(index));
    parent.addChildEntry(root);
    root = parent;
    --index;
  }
  
  return root;
}

origin: ca.carleton.gcrc/nunaliit2-couch-user

FSEntryResource resourceFile = FSEntryResource.create(UserDesignDocument.class.getClassLoader(), "userDesignDocument");
Document doc = DocumentFile.createDocument(resourceFile, resourceFile);
ca.carleton.gcrc.couch.fsentryFSEntryResourcecreate

Javadoc

Creates an instance of FSEntryResource to represent an entry based on the resource specified by the classLoader and resource name.

Popular methods of FSEntryResource

  • <init>
  • getChildren
  • getName
  • nameFromJarEntry

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Menu (java.awt)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Permission (java.security)
    Legacy security code; do not use.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top plugins for Android Studio
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