Tabnine Logo
PathContainerService.isContainer
Code IndexAdd Tabnine to your IDE (free)

How to use
isContainer
method
in
ch.cyberduck.core.PathContainerService

Best Java code snippets using ch.cyberduck.core.PathContainerService.isContainer (Showing top 20 results out of 315)

origin: iterate-ch/cyberduck

@Override
public boolean isSupported(final Path source, final Path target) {
  return !containerService.isContainer(source);
}
origin: iterate-ch/cyberduck

  @Override
  public boolean isSupported(final Path source, final Path target) {
    return !containerService.isContainer(source) && !containerService.isContainer(target);
  }
}
origin: iterate-ch/cyberduck

  @Override
  public boolean isSupported(final Path source, final Path target) {
    return !containerService.isContainer(source) && !containerService.isContainer(target);
  }
}
origin: iterate-ch/cyberduck

  @Override
  public boolean isSupported(final Path source, final Path target) {
    return !containerService.isContainer(source) && !containerService.isContainer(target);
  }
}
origin: iterate-ch/cyberduck

@Override
public boolean isSupported(final Path source, final Path target) {
  return !containerService.isContainer(source);
}
origin: iterate-ch/cyberduck

@Override
public boolean isSupported(final Path source, final Path target) {
  return !containerService.isContainer(source);
}
origin: iterate-ch/cyberduck

  @Override
  public boolean isContainer(final Path file) {
    return super.isContainer(file) || file.getType().contains(Path.Type.volume);
  }
}
origin: iterate-ch/cyberduck

@Override
public boolean isContainer(final Path file) {
  return super.isContainer(file) || file.getType().contains(Path.Type.volume);
}
origin: iterate-ch/cyberduck

/**
 * @return Default path or root with volume attributes set
 */
public Path getContainer(final Path file) {
  if(file.isRoot()) {
    return file;
  }
  Path container = file;
  while(!this.isContainer(container)) {
    container = container.getParent();
  }
  return container;
}
origin: iterate-ch/cyberduck

@Override
public Acl getPermission(final Path file) {
  if(containerService.isContainer(file)) {
    return containerService.getContainer(file).attributes().getAcl();
  }
  return Acl.EMPTY;
}
origin: iterate-ch/cyberduck

  @Override
  public Path mkdir(final Path folder, final String region, final TransferStatus status) throws BackgroundException {
    if(containerService.isContainer(folder)) {
      final GoogleStorageBucketCreateService service = new GoogleStorageBucketCreateService(session);
      service.create(folder, region);
      return folder;
    }
    else {
      return super.mkdir(folder, region, status);
    }
  }
}
origin: iterate-ch/cyberduck

@Override
public Path find() throws BackgroundException {
  final Path home = super.find();
  if(containerService.isContainer(home)) {
    return new Path(home.getParent(), home.getName(), EnumSet.of(Path.Type.volume, Path.Type.directory));
  }
  return home;
}
origin: iterate-ch/cyberduck

  @Override
  public Path find(final Path root, final String path) {
    final Path home = super.find(root, path);
    if(containerService.isContainer(home)) {
      return new Path(home.getParent(), home.getName(), EnumSet.of(Path.Type.volume, Path.Type.directory));
    }
    return home;
  }
}
origin: iterate-ch/cyberduck

@Override
public Algorithm getEncryption(final Path file) throws BackgroundException {
  if(containerService.isContainer(file)) {
    final String key = String.format("s3.encryption.key.%s", containerService.getContainer(file).getName());
    if(StringUtils.isNotBlank(preferences.getProperty(key))) {
      return Algorithm.fromString(preferences.getProperty(key));
    }
  }
  return super.getEncryption(file);
}
origin: iterate-ch/cyberduck

  /**
   * @return Path relative to the container name
   */
  public String getKey(final Path file) {
    if(file.isRoot()) {
      return null;
    }
    if(this.isContainer(file)) {
      return null;
    }
    return PathRelativizer.relativize(this.getContainer(file).getAbsolute(), file.getAbsolute());
  }
}
origin: iterate-ch/cyberduck

  @Override
  public Path mkdir(final Path folder, final String region, final TransferStatus status) throws BackgroundException {
    if(containerService.isContainer(folder)) {
      return super.mkdir(folder, region, status);
    }
    else {
      if(Checksum.NONE == status.getChecksum()) {
        status.setChecksum(writer.checksum(folder).compute(new NullInputStream(0L), status));
      }
      return super.mkdir(folder, region, status);
    }
  }
}
origin: iterate-ch/cyberduck

@Override
public boolean isSupported(final Path file) {
  if(containerService.isContainer(file)) {
    if(PreferencesFactory.get().getBoolean("sds.delete.dataroom.enable")) {
      // Need the query permission on the parent data room if file itself is subroom
      new SDSPermissionsFeature(session, nodeid).containsRole(containerService.getContainer(file.getParent()),
        SDSPermissionsFeature.MANAGE_ROLE);
    }
    return false;
  }
  return new SDSPermissionsFeature(session, nodeid).containsRole(file, SDSPermissionsFeature.DELETE_ROLE);
}
origin: iterate-ch/cyberduck

public DefaultPathPredicate(final Path file) {
  final Path.Type type = file.isSymbolicLink() ? Path.Type.symboliclink : file.isFile() ? Path.Type.file : Path.Type.directory;
  String qualifier = StringUtils.EMPTY;
  if(StringUtils.isNotBlank(file.attributes().getRegion())) {
    if(new PathContainerService().isContainer(file)) {
      qualifier += file.attributes().getRegion();
    }
  }
  if(file.isFile()) {
    if(StringUtils.isNotBlank(file.attributes().getVersionId())) {
      qualifier += file.attributes().getVersionId();
    }
  }
  final String path = file.getAbsolute();
  reference = "[" + type + "]" + "-" + qualifier + path;
}
origin: iterate-ch/cyberduck

@Override
public PathAttributes find(final Path file) throws BackgroundException {
  if(file.isRoot()) {
    return PathAttributes.EMPTY;
  }
  if(file.getType().contains(Path.Type.upload)) {
    return PathAttributes.EMPTY;
  }
  if(containerService.isContainer(file)) {
    final PathAttributes attributes = new PathAttributes();
    attributes.setRegion(new S3LocationFeature(session, session.getClient().getRegionEndpointCache()).getLocation(file).getIdentifier());
    return attributes;
  }
  return this.toAttributes(this.details(file));
}
origin: iterate-ch/cyberduck

@Override
public PathAttributes find(final Path file) throws BackgroundException {
  if(file.isRoot()) {
    return PathAttributes.EMPTY;
  }
  if(new PathContainerService().isContainer(file)) {
    return PathAttributes.EMPTY;
  }
  final AttributedList<Path> list = new FileidDriveListService(session, fileid, file).list(file.getParent(), new DisabledListProgressListener());
  final Path found = list.find(new DriveFileidProvider.IgnoreTrashedPathPredicate(file));
  if(null == found) {
    throw new NotfoundException(file.getAbsolute());
  }
  return found.attributes();
}
ch.cyberduck.corePathContainerServiceisContainer

Popular methods of PathContainerService

  • getContainer
  • getKey
  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • BoxLayout (javax.swing)
  • Top 12 Jupyter Notebook extensions
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