commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berlin Brown <berlin.br...@gmail.com>
Subject VFS and SFTP, not working?
Date Wed, 05 Oct 2005 03:44:38 GMT
I think the SFTP side of VFS is not working.  I tried with a
development machine with the same drive setup and it worked fine, a
little slow but fine.  The SFTP just locks up.  I would give you the
output, but it doesnt do anything.  Here is my code using JYTHON.

def getLocalDir(manager):
    f = manager.resolveFile("C:\Berlin\Downloads4\workspace\Numbers\SPEROLOGGING\logs\\access_log")
    typ = f.getType()
    print "-" * 50
    print "Name: ", f.getName()
    print "Read: ", f.isReadable()
    print "HasKids: ", typ.hasChildren()
    print "Name: ", f.getName()
    f.createFile()
    return f

if __name__ == '__main__':
    print "## starting"
    fsManager = v.VFS.getManager()
    f = fsManager.resolveFile( SFTP_URL )
    typ = f.getType()
    print "Name: ", f.getName()
    print "Read: ", f.isReadable()
    print "HasKids: ", typ.hasChildren()
    print "Name: ", f.getName()

    a = f.getContent()
    print "Type: ", typ.getName()
    print "Content: ", a
    print "Exists: ", f.exists()
    #print "Writable: ", f.isWriteable()

    #---------------------------------------------
    fs = f.getFileSystem()
    print fs.getRootName()
    opts = fs.getFileSystemOptions()
    print "FS Options: ", opts

    dest = getLocalDir(fsManager)
    dest.copyFrom(f, v.Selectors.SELECT_SELF)

    print "## done"

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message