congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
PathContainerService.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
ch.cyberduck.core.PathContainerService
constructor

Best Java code snippets using ch.cyberduck.core.PathContainerService.<init> (Showing top 8 results out of 315)

origin: iterate-ch/cyberduck

  public SwiftHomeFinderService(final SwiftSession session) {
    super(session, new PathContainerService());
  }
}
origin: iterate-ch/cyberduck

private Map<Path, Boolean> getRoomEncryptionStatus(final Map<TransferItem, TransferStatus> files) throws BackgroundException {
  final Map<Path, Boolean> rooms = new HashMap<>();
  for(Map.Entry<TransferItem, TransferStatus> entry : files.entrySet()) {
    // Get top level room
    final Path container = new PathContainerService().getContainer(entry.getKey().remote);
    if(rooms.containsKey(container)) {
      continue;
    }
    rooms.put(container, nodeid.isEncrypted(entry.getKey().remote));
  }
  return rooms;
}
origin: iterate-ch/cyberduck

@Override
public Void pre(final Transfer.Type type, final Map<TransferItem, TransferStatus> files, final ConnectionCallback callback) throws BackgroundException {
  switch(type) {
    case download:
      break;
    default: {
      final Map<Path, Boolean> rooms = this.getRoomEncryptionStatus(files);
      for(Map.Entry<TransferItem, TransferStatus> entry : files.entrySet()) {
        final Path container = new PathContainerService().getContainer(entry.getKey().remote);
        if(rooms.get(container)) {
          final TransferStatus status = entry.getValue();
          nodeid.setFileKey(status);
        }
      }
    }
  }
  return null;
}
origin: iterate-ch/cyberduck

@Override
public void post(final Transfer.Type type, final Map<TransferItem, TransferStatus> files, final ConnectionCallback callback) throws BackgroundException {
  switch(type) {
    case download:
      break;
    default:
      if(PreferencesFactory.get().getBoolean("sds.encryption.missingkeys.upload")) {
        if(session.userAccount().isEncryptionEnabled()) {
          final SDSMissingFileKeysSchedulerFeature background = new SDSMissingFileKeysSchedulerFeature(session, nodeid);
          final Map<Path, Boolean> rooms = this.getRoomEncryptionStatus(files);
          for(Map.Entry<TransferItem, TransferStatus> entry : files.entrySet()) {
            final Path container = new PathContainerService().getContainer(entry.getKey().remote);
            if(rooms.get(container)) {
              background.operate(callback, entry.getKey().remote);
            }
          }
        }
      }
  }
}
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

if(new PathContainerService().isContainer(file)) {
  attributes += file.attributes().getRegion();
origin: iterate-ch/cyberduck

final Path container = new PathContainerService().getContainer(file);
if(container.attributes().getCustom().containsKey(SDSAttributesFinderFeature.KEY_ENCRYPTED)) {
  return Boolean.valueOf(container.attributes().getCustom().get(SDSAttributesFinderFeature.KEY_ENCRYPTED));
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.corePathContainerService<init>

Popular methods of PathContainerService

  • isContainer
  • getContainer
  • getKey

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • getSharedPreferences (Context)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Path (java.nio.file)
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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