## helma.scripting.rhino.extensions
Class FtpObject

    java.lang.Object
      org.mozilla.javascript.ScriptableObject
          helma.scripting.rhino.extensions.FtpObject

All Implemented Interfaces:
  java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

    public class FtpObject

extends org.mozilla.javascript.ScriptableObject

A FTP-client object that allows to do some FTP from HOP applications. FTP support is far from complete but can easily be extended if more functionality is needed. This uses the NetComponent classes from savarese.org (ex oroinc.com).

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.mozilla.javascript.ScriptableObject
`CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST`

Fields inherited from interface org.mozilla.javascript.Scriptable
`NOT_FOUND`

Method Summary
`boolean` `ascii()`
`boolean` `binary()`
`boolean` `cd(java.lang.String path)`
`static FtpObject` `ftpObjCtor(org.mozilla.javascript.Context cx, java.lang.Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr)`
`java.lang.String` `getClassName()`
`boolean` `getFile(java.lang.String remoteFile, java.lang.String localFile)`
`java.lang.Object` `getString(java.lang.String remoteFile)`
`static void` `init(org.mozilla.javascript.Scriptable scope)`
`boolean` `lcd(java.lang.String dir)`
`boolean` `login(java.lang.String username, java.lang.String password)` Login to the FTP server
`boolean` `logout()` Disconnect from FTP server
`boolean` `mkdir(java.lang.String dir)`
`boolean` `putFile(java.lang.String localFile, java.lang.String remoteFile)`
`boolean` `putString(java.lang.Object obj, java.lang.String remoteFile)`
`java.lang.String` `toDetailString()`
`java.lang.String` `toString()`

Methods inherited from class org.mozilla.javascript.ScriptableObject

`associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### getClassName

    public java.lang.String getClassName()

  Specified by:
    `getClassName` in interface `org.mozilla.javascript.Scriptable`
  Specified by:
    `getClassName` in class `org.mozilla.javascript.ScriptableObject`
  Returns:
    ...

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    ...

### toDetailString

    public java.lang.String toDetailString()

  Returns:
    ...

### login

    public boolean login(java.lang.String username,
                         java.lang.String password)

  Login to the FTP server

  Parameters:
    `username` - the user name
    `password` - the user's password
  Returns:
    true if successful, false otherwise

### cd

    public boolean cd(java.lang.String path)

### mkdir

    public boolean mkdir(java.lang.String dir)

### lcd

    public boolean lcd(java.lang.String dir)

### putFile

    public boolean putFile(java.lang.String localFile,
                           java.lang.String remoteFile)

### putString

    public boolean putString(java.lang.Object obj,
                             java.lang.String remoteFile)

### getFile

    public boolean getFile(java.lang.String remoteFile,
                           java.lang.String localFile)

### getString

    public java.lang.Object getString(java.lang.String remoteFile)

### logout

    public boolean logout()

  Disconnect from FTP server

  Returns:
    true if successful, false otherwise

### binary

    public boolean binary()

### ascii

    public boolean ascii()

### ftpObjCtor

    public static FtpObject ftpObjCtor(org.mozilla.javascript.Context cx,
                                       java.lang.Object[] args,
                                       org.mozilla.javascript.Function ctorObj,
                                       boolean inNewExpr)

### init

    public static void init(org.mozilla.javascript.Scriptable scope)

Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.