Tabnine Logo
ca.carleton.gcrc.couch.fsentry
Code IndexAdd Tabnine to your IDE (free)

How to use ca.carleton.gcrc.couch.fsentry

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

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

@Override
public String getExtension() {
  return FSEntrySupport.extensionFromName(getName());
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public String getExtension() {
  return FSEntrySupport.extensionFromName(getName());
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public String getExtension() {
  return FSEntrySupport.extensionFromName(getName());
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

/**
 * Create a virtual tree hierarchy with a file supporting the leaf.
 * @param path Position of the file in the hierarchy, including its name
 * @param file The actual file, or directory , abcking the end leaf
 * @return The FSEntry root for this hierarchy
 * @throws Exception Invalid parameter
 */
static public FSEntry getPositionedFile(String path, File file) throws Exception {
  List<String> pathFrags = FSEntrySupport.interpretPath(path);
  
  // Start at leaf and work our way back
  int index = pathFrags.size() - 1;
  FSEntry root = new FSEntryFile(pathFrags.get(index), file);
  
  --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-client

@Override
public String getExtension() {
  return FSEntrySupport.extensionFromName(getName());
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public String getExtension() {
  return FSEntrySupport.extensionFromName(getName());
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public InputStream getInputStream() throws Exception {
  for(FSEntry entry : entries){
    InputStream is = entry.getInputStream();
    if( null != is ) {
      return is;
    }
  }
  
  return null;
}
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

@Override
public String getExtension() {
  return FSEntrySupport.extensionFromName(name);
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

  @Override
  public int compare(FSEntry o1, FSEntry o2) {
    return o1.getName().compareTo( o2.getName() );
  }
});
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public boolean isDirectory() {
  return entries.get(0).isDirectory();
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public FSEntry getChild(String name) {
  FSEntry result = null;
  
  if( file.exists() && file.isDirectory() ){
    File childFile = new File(file,name);
    if( childFile.exists() ) {
      result = new FSEntryFile(_Internal.INTERNAL, childFile);
    }
  }
  
  return result;
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public boolean exists() {
  for(FSEntry entry : entries){
    if( entry.exists() ) {
      return true;
    }
  }
  
  return false;
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public FSEntry getChild(String name) {
  // Accumulate the lists of files
  for(FSEntry entry : entries){
    FSEntry child = entry.getChild(name);
    if( null != child ){
      return child;
    }
  }
  return null;
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public List<FSEntry> getChildren() {
  return getChildren(FSEntryNameFilter.all);
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public List<FSEntry> getChildren() {
  return getChildren(FSEntryNameFilter.all);
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public List<FSEntry> getChildren() {
  return getChildren(FSEntryNameFilter.all);
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public long getSize() throws Exception {
  return entry.getSize();
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public List<FSEntry> getChildren() {
  return getChildren(FSEntryNameFilter.all);
}
origin: ca.carleton.gcrc/nunaliit2-couch-client

@Override
public InputStream getInputStream() throws Exception {
  return entry.getInputStream();
}
ca.carleton.gcrc.couch.fsentry

Most used classes

  • FSEntry
    Instances implementing this interface are used to represent File System elements. In some cases, fil
  • FSEntryBuffer
    Instances of this class are used to masquerade a file using a String.
  • FSEntryFile
    Instances of this class are FSEntry that are backed by a disk file entry (File).
  • FSEntryMerged
  • FSEntryNameFilter
  • FSEntrySupport,
  • FSEntryNull,
  • FSEntryVirtualDirectory
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