Tabnine Logo
SftpFileObject.statSelf
Code IndexAdd Tabnine to your IDE (free)

How to use
statSelf
method
in
org.apache.commons.vfs2.provider.sftp.SftpFileObject

Best Java code snippets using org.apache.commons.vfs2.provider.sftp.SftpFileObject.statSelf (Showing top 12 results out of 315)

origin: com.github.abashev/commons-vfs2

/**
 * Called when the type or content of this file changes.
 */
@Override
protected void onChange() throws Exception {
  statSelf();
}
origin: org.jetbrains.intellij.deps/commons-vfs2

/**
 * Called when the type or content of this file changes.
 */
@Override
protected void onChange() throws Exception
{
  statSelf();
}
origin: org.apache.commons/commons-vfs2

/**
 * Called when the type or content of this file changes.
 */
@Override
protected void onChange() throws Exception {
  statSelf();
}
origin: apache/commons-vfs

/**
 * Called when the type or content of this file changes.
 */
@Override
protected void onChange() throws Exception {
  statSelf();
}
origin: apache/commons-vfs

/**
 * Determines the type of this file, returns null if the file does not exist.
 */
@Override
protected FileType doGetType() throws Exception {
  if (attrs == null) {
    statSelf();
  }
  if (attrs == null) {
    return FileType.IMAGINARY;
  }
  if ((attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS) == 0) {
    throw new FileSystemException("vfs.provider.sftp/unknown-permissions.error");
  }
  if (attrs.isDir()) {
    return FileType.FOLDER;
  }
  return FileType.FILE;
}
origin: com.github.abashev/commons-vfs2

/**
 * Determines the type of this file, returns null if the file does not exist.
 */
@Override
protected FileType doGetType() throws Exception {
  if (attrs == null) {
    statSelf();
  }
  if (attrs == null) {
    return FileType.IMAGINARY;
  }
  if ((attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS) == 0) {
    throw new FileSystemException("vfs.provider.sftp/unknown-permissions.error");
  }
  if (attrs.isDir()) {
    return FileType.FOLDER;
  }
  return FileType.FILE;
}
origin: org.apache.commons/commons-vfs2

/**
 * Determines the type of this file, returns null if the file does not exist.
 */
@Override
protected FileType doGetType() throws Exception {
  if (attrs == null) {
    statSelf();
  }
  if (attrs == null) {
    return FileType.IMAGINARY;
  }
  if ((attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS) == 0) {
    throw new FileSystemException("vfs.provider.sftp/unknown-permissions.error");
  }
  if (attrs.isDir()) {
    return FileType.FOLDER;
  }
  return FileType.FILE;
}
origin: org.jetbrains.intellij.deps/commons-vfs2

statSelf();
  if (fileObject.attrs == null)
    fileObject.statSelf();
origin: org.apache.commons/commons-vfs2

/**
 * Returns the POSIX type permissions of the file.
 *
 * @param checkIds {@code true} if user and group ID should be checked (needed for some access rights checks)
 * @return A PosixPermission object
 * @throws Exception If an error occurs
 * @since 2.1
 */
protected PosixPermissions getPermissions(final boolean checkIds) throws Exception {
  statSelf();
  boolean isInGroup = false;
  if (checkIds) {
    for (final int groupId : getAbstractFileSystem().getGroupsIds()) {
      if (groupId == attrs.getGId()) {
        isInGroup = true;
        break;
      }
    }
  }
  final boolean isOwner = checkIds ? attrs.getUId() == getAbstractFileSystem().getUId() : false;
  return new PosixPermissions(attrs.getPermissions(), isOwner, isInGroup);
}
origin: com.github.abashev/commons-vfs2

/**
 * Returns the POSIX type permissions of the file.
 *
 * @param checkIds {@code true} if user and group ID should be checked (needed for some access rights checks)
 * @return A PosixPermission object
 * @throws Exception If an error occurs
 * @since 2.1
 */
protected PosixPermissions getPermissions(final boolean checkIds) throws Exception {
  statSelf();
  boolean isInGroup = false;
  if (checkIds) {
    for (final int groupId : getAbstractFileSystem().getGroupsIds()) {
      if (groupId == attrs.getGId()) {
        isInGroup = true;
        break;
      }
    }
  }
  final boolean isOwner = checkIds ? attrs.getUId() == getAbstractFileSystem().getUId() : false;
  return new PosixPermissions(attrs.getPermissions(), isOwner, isInGroup);
}
origin: apache/commons-vfs

/**
 * Returns the POSIX type permissions of the file.
 *
 * @param checkIds {@code true} if user and group ID should be checked (needed for some access rights checks)
 * @return A PosixPermission object
 * @throws Exception If an error occurs
 * @since 2.1
 */
protected PosixPermissions getPermissions(final boolean checkIds) throws Exception {
  statSelf();
  boolean isInGroup = false;
  if (checkIds) {
    for (final int groupId : getAbstractFileSystem().getGroupsIds()) {
      if (groupId == attrs.getGId()) {
        isInGroup = true;
        break;
      }
    }
  }
  final boolean isOwner = checkIds ? attrs.getUId() == getAbstractFileSystem().getUId() : false;
  return new PosixPermissions(attrs.getPermissions(), isOwner, isInGroup);
}
origin: org.jetbrains.intellij.deps/commons-vfs2

/**
 * Returns the POSIX type permissions of the file.
 *
 * @param checkIds {@code true} if user and group ID should be checked (needed for some access rights checks)
 * @return A PosixPermission object
 * @throws Exception If an error occurs
 * @since 2.1
 */
protected PosixPermissions getPermissions(final boolean checkIds) throws Exception
{
  statSelf();
  boolean isInGroup = false;
  if (checkIds)
  {
    for (final int groupId : getAbstractFileSystem().getGroupsIds())
    {
      if (groupId == attrs.getGId())
      {
        isInGroup = true;
        break;
      }
    }
  }
  final boolean isOwner = checkIds ?  attrs.getUId() == getAbstractFileSystem().getUId() : false;
  final PosixPermissions permissions = new PosixPermissions(attrs.getPermissions(), isOwner, isInGroup);
  return permissions;
}
org.apache.commons.vfs2.provider.sftpSftpFileObjectstatSelf

Javadoc

Fetches file attributes from server.

Popular methods of SftpFileObject

  • getContent
  • getPermissions
    Returns the POSIX type permissions of the file.
  • <init>
  • flushStat
  • getAbstractFileSystem
  • getFileSystem
  • getInputStream
    Creates an input stream to read the file content from. The input stream is starting at the given pos
  • getName
  • getType
  • isFile
  • setStat
    Set attrs from listChildrenResolved
  • doIsReadable
  • setStat,
  • doIsReadable,
  • doIsWriteable,
  • getLinkDestination

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • JComboBox (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 25 Plugins for Webstorm
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