FileDocCategorySizeDatePackage
Chgrp.javaAPI DocApache Ant 1.702693Wed Dec 13 06:16:18 GMT 2006org.apache.tools.ant.taskdefs.optional.unix

Chgrp

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

Fields Summary
private boolean
haveGroup
Constructors Summary
public Chgrp()
Chgrp task for setting unix group of a file.


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

        if (!haveGroup) {
            throw new BuildException("Required attribute group not set in "
                                     + "chgrp", 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 voidsetGroup(java.lang.String group)
Set the group atribute.

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

        createArg().setValue(group);
        haveGroup = true;