FileDocCategorySizeDatePackage
Chown.javaAPI DocApache Ant 1.702703Wed Dec 13 06:16:22 GMT 2006org.apache.tools.ant.taskdefs.optional.unix

Chown

public class Chown extends AbstractAccessTask
Chown equivalent for unix-like environments.
since
Ant 1.6
ant.task
category="filesystem"

Fields Summary
private boolean
haveOwner
Constructors Summary
public Chown()
Chown task for setting file and directory permissions.


                 
      
        super.setExecutable("chown");
    
Methods Summary
protected voidcheckConfiguration()
Ensure that all the required arguments and other conditions have been set.

        if (!haveOwner) {
            throw new BuildException("Required attribute owner not set in"
                                     + " chown", getLocation());
        }
        super.checkConfiguration();
    
public voidsetExecutable(java.lang.String e)
We don't want to expose the executable atribute, so overide it.

param
e User supplied executable that we won't accept.

        throw new BuildException(getTaskType()
                                 + " doesn\'t support the executable"
                                 + " attribute", getLocation());
    
public voidsetOwner(java.lang.String owner)
Set the owner atribute.

param
owner The new owner for the file(s) or directory(ies)

        createArg().setValue(owner);
        haveOwner = true;