Tabnine Logo
LocalAttributes$LocalPermission
Code IndexAdd Tabnine to your IDE (free)

How to use
LocalAttributes$LocalPermission
in
ch.cyberduck.core

Best Java code snippets using ch.cyberduck.core.LocalAttributes$LocalPermission (Showing top 4 results out of 315)

origin: iterate-ch/cyberduck

@Override
public Permission getPermission() {
  if(FileSystems.getDefault().supportedFileAttributeViews().contains("posix")) {
    final BasicFileAttributes attributes;
    try {
      return new LocalPermission(PosixFilePermissions.toString(Files.readAttributes(Paths.get(path), PosixFileAttributes.class, LinkOption.NOFOLLOW_LINKS).permissions()));
    }
    catch(IOException e) {
      return Permission.EMPTY;
    }
  }
  return Permission.EMPTY;
}
origin: iterate-ch/cyberduck

  @Override
  public boolean isWritable() {
    final NSURL resolved;
    try {
      resolved = local.lock(false);
      if(null == resolved) {
        return super.isWritable();
      }
    }
    catch(AccessDeniedException e) {
      return super.isWritable();
    }
    try {
      return NSFileManager.defaultManager().isWritableFileAtPath(resolved.path());
    }
    finally {
      local.release(resolved);
    }
  }
}
origin: iterate-ch/cyberduck

@Override
public boolean isExecutable() {
  final NSURL resolved;
  try {
    resolved = local.lock(false);
    if(null == resolved) {
      return super.isExecutable();
    }
  }
  catch(AccessDeniedException e) {
    return super.isExecutable();
  }
  try {
    return NSFileManager.defaultManager().isExecutableFileAtPath(resolved.path());
  }
  finally {
    local.release(resolved);
  }
}
origin: iterate-ch/cyberduck

@Override
public boolean isReadable() {
  final NSURL resolved;
  try {
    resolved = local.lock(false);
    if(null == resolved) {
      return super.isReadable();
    }
  }
  catch(AccessDeniedException e) {
    return super.isReadable();
  }
  try {
    return NSFileManager.defaultManager().isReadableFileAtPath(resolved.path());
  }
  finally {
    local.release(resolved);
  }
}
ch.cyberduck.coreLocalAttributes$LocalPermission

Most used methods

  • <init>
  • isExecutable
  • isReadable
  • isWritable

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • JTable (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top Sublime Text plugins
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