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

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

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

origin: org.jetbrains.intellij.deps/commons-vfs2

/**
 * Return the destination of this file object if it's a symbolic link
 *
 * @return FileObject representing the linked to location
 */
@Override
public SftpFileObject getLinkDestination() throws Exception {
  if (linkDestination == null) {
    final ChannelSftp channel = getAbstractFileSystem().getChannel();
    try {
      final String path = channel.readlink(relPath);
      FileName relativeTo = getName().getParent();
      if (relativeTo == null) {
        relativeTo = getName();
      }
      FileName linkDestinationName = getFileSystem().getFileSystemManager().resolveName(relativeTo, path);
      linkDestination = (SftpFileObject) getFileSystem().resolveFile(linkDestinationName);
    }
    finally {
      getAbstractFileSystem().putChannel(channel);
    }
  }
  return linkDestination;
}
// [IntelliJ] WI-5627 --------------
origin: com.github.abashev/commons-vfs2

    throw new FileSystemException("vfs.provider/read-not-file.error", getName());
} catch (final SftpException e) {
  if (e.id == ChannelSftp.SSH_FX_NO_SUCH_FILE) {
    throw new FileNotFoundException(getName());
origin: org.apache.commons/commons-vfs2

    throw new FileSystemException("vfs.provider/read-not-file.error", getName());
} catch (final SftpException e) {
  if (e.id == ChannelSftp.SSH_FX_NO_SUCH_FILE) {
    throw new FileNotFoundException(getName());
origin: apache/commons-vfs

.resolveName(getName(), UriParser.encode(name), NameScope.CHILD));
origin: org.apache.commons/commons-vfs2

.resolveName(getName(), UriParser.encode(name), NameScope.CHILD));
origin: com.github.abashev/commons-vfs2

.resolveName(getName(), UriParser.encode(name), NameScope.CHILD));
origin: apache/commons-vfs

    throw new FileSystemException("vfs.provider/read-not-file.error", getName());
} catch (final SftpException e) {
  if (e.id == ChannelSftp.SSH_FX_NO_SUCH_FILE) {
    throw new FileNotFoundException(getName());
origin: com.github.abashev/commons-vfs2

/**
 * Creates an input stream to read the file content from. The input stream is starting at the given position in the
 * file.
 */
InputStream getInputStream(final long filePointer) throws IOException {
  final ChannelSftp channel = getAbstractFileSystem().getChannel();
  // Using InputStream directly from the channel
  // is much faster than the memory method.
  try {
    final InputStream is = channel.get(getName().getPathDecoded(), null, filePointer);
    return new SftpInputStream(channel, is);
  } catch (final SftpException e) {
    getAbstractFileSystem().putChannel(channel);
    throw new FileSystemException(e);
  }
}
origin: apache/commons-vfs

/**
 * Creates an input stream to read the file content from. The input stream is starting at the given position in the
 * file.
 */
InputStream getInputStream(final long filePointer) throws IOException {
  final ChannelSftp channel = getAbstractFileSystem().getChannel();
  // Using InputStream directly from the channel
  // is much faster than the memory method.
  try {
    final InputStream is = channel.get(getName().getPathDecoded(), null, filePointer);
    return new SftpInputStream(channel, is);
  } catch (final SftpException e) {
    getAbstractFileSystem().putChannel(channel);
    throw new FileSystemException(e);
  }
}
origin: org.apache.commons/commons-vfs2

/**
 * Creates an input stream to read the file content from. The input stream is starting at the given position in the
 * file.
 */
InputStream getInputStream(final long filePointer) throws IOException {
  final ChannelSftp channel = getAbstractFileSystem().getChannel();
  // Using InputStream directly from the channel
  // is much faster than the memory method.
  try {
    final InputStream is = channel.get(getName().getPathDecoded(), null, filePointer);
    return new SftpInputStream(channel, is);
  } catch (final SftpException e) {
    getAbstractFileSystem().putChannel(channel);
    throw new FileSystemException(e);
  }
}
origin: org.jetbrains.intellij.deps/commons-vfs2

throw new FileSystemException("vfs.provider/read-not-file.error", getName());
throw new FileNotFoundException(getName());
origin: org.jetbrains.intellij.deps/commons-vfs2

.resolveFile(
    getFileSystem().getFileSystemManager().resolveChildName(
    getName(), UriParser.encode(name)));
origin: org.jetbrains.intellij.deps/commons-vfs2

/**
 * Creates an input stream to read the file content from.
 * The input stream is starting at the given position in the file.
 */
InputStream getInputStream(final long filePointer) throws IOException
{
  final ChannelSftp channel = getAbstractFileSystem().getChannel();
  // Using InputStream directly from the channel
  // is much faster than the memory method.
  try
  {
    final InputStream is = channel.get(getName().getPathDecoded(), null, filePointer);
    return new SftpInputStream(channel, is);
  }
  catch (final SftpException e)
  {
    getAbstractFileSystem().putChannel(channel);
    throw new FileSystemException(e);
  }
}
org.apache.commons.vfs2.provider.sftpSftpFileObjectgetName

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
  • getType
  • isFile
  • setStat
    Set attrs from listChildrenResolved
  • statSelf
    Fetches file attributes from server.
  • doIsReadable
  • statSelf,
  • doIsReadable,
  • doIsWriteable,
  • getLinkDestination

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • onCreateOptionsMenu (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Best plugins for Eclipse
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