Examples of stat()


Examples of com.jcraft.jsch.ChannelSftp.stat()

    public void execute() throws IOException, JSchException {
        ChannelSftp channel = openSftpChannel();
        try {
            channel.connect();
            try {
                SftpATTRS attrs = channel.stat(remoteFile);
                if (attrs.isDir() && !remoteFile.endsWith("/")) {
                    remoteFile = remoteFile + "/";
                }
            } catch (SftpException ee) {
                // Ignored
View Full Code Here

Examples of com.jcraft.jsch.ChannelSftp.stat()

    public void execute() throws IOException, JSchException {
        ChannelSftp channel = openSftpChannel();
        try {
            channel.connect();
            try {
                SftpATTRS attrs = channel.stat(remoteFile);
                if (attrs.isDir() && !remoteFile.endsWith("/")) {
                    remoteFile = remoteFile + "/";
                }
            } catch (SftpException ee) {
                // Ignored
View Full Code Here

Examples of com.jcraft.jsch.ChannelSftp.stat()

        try {
            channel.connect();

            try {
                try {
                    channel.stat(remotePath);
                } catch (SftpException e) {
                    if (e.id == ChannelSftp.SSH_FX_NO_SUCH_FILE) {
                        // dir does not exist.
                        channel.mkdir(remotePath);
                    } else {
View Full Code Here

Examples of com.jcraft.jsch.ChannelSftp.stat()

        try {
            ChannelSftp channel = getOrCreateChannel(uri);
            SftpATTRS stat;

            try {
                stat = channel.stat(uri.getPath());
            } catch (SftpException e) {
                throw new ResourceNotFoundException(e);
            }

            return new SshResource(this, channel, uri, stat);
View Full Code Here

Examples of com.jcraft.jsch.ChannelSftp.stat()

        try {
            ChannelSftp channel = getOrCreateChannel(uri);
            SftpATTRS stat;

            try {
                stat = channel.stat(uri.getPath());
            } catch (SftpException e) {
                throw new ResourceNotFoundException(e);
            }

            return new SshResource(this, channel, uri, stat);
View Full Code Here

Examples of com.jcraft.jsch.ChannelSftp.stat()

    private void statSelf() throws IOException
    {
        ChannelSftp channel = getAbstractFileSystem().getChannel();
        try
        {
            setStat(channel.stat(relPath));
        }
        catch (final SftpException e)
        {
            try
            {
View Full Code Here

Examples of com.jcraft.jsch.ChannelSftp.stat()

                // maybe the channel has some problems, so recreate the channel and retry
                if (e.id != ChannelSftp.SSH_FX_NO_SUCH_FILE)
                {
                    channel.disconnect();
                    channel = getAbstractFileSystem().getChannel();
                    setStat(channel.stat(relPath));
                }
                else
                {
                    // Really does not exist
                    attrs = null;
View Full Code Here

Examples of com.sleepycat.je.dbi.DatabaseImpl.stat()

        /* check number of LNs in the id mapping tree. */
        DatabaseImpl mapDbImpl =
            envImpl.getDbMapTree().getDb(DbTree.ID_DB_ID);
        // mapDbImpl.getTree().dump();
        BtreeStats mapStats =
            (BtreeStats) mapDbImpl.stat(new StatsConfig());
        assertEquals(expectMapLNs,
                     (mapStats.getLeafNodeCount()));

        /* check number of LNs in the naming tree. */
        DatabaseImpl nameDbImpl =
View Full Code Here

Examples of com.sleepycat.je.dbi.DatabaseImpl.stat()

        /* check number of LNs in the naming tree. */
        DatabaseImpl nameDbImpl =
            envImpl.getDbMapTree().getDb(DbTree.NAME_DB_ID);
        BtreeStats nameStats =
            (BtreeStats) nameDbImpl.stat(new StatsConfig());
        assertEquals(expectNameLNs,
                     (nameStats.getLeafNodeCount()));
    }
}
View Full Code Here

Examples of com.trilead.ssh2.SFTPv3Client.stat()

      boolean exists = true;
      // check if File already exists
      while (exists) {
        try {
          SFTPv3FileAttributes attribs = sftpClient.stat(commandFile.getName());
        }
        catch (SFTPException e) {
          getLogger().debug9("Error code when checking file existence: " + e.getServerErrorCode());
          exists = false;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.