public class Chmod extends ExecuteOn
ExecuteOn.FileDirBoth
destDir, filesets, mapper, mapperElement, srcFilePos, srcIsFirst, targetFilePos, type
cmdl, failOnError, newEnvironment, redirector, redirectorElement
description, location, project
Constructor and Description |
---|
Chmod()
Chmod task for setting file and directory permissions.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkConfiguration()
Check the attributes and nested elements.
|
PatternSet.NameEntry |
createExclude()
Add a name entry on the exclude list.
|
PatternSet.NameEntry |
createInclude()
Add a name entry on the include list.
|
PatternSet |
createPatternSet()
Add a set of patterns.
|
void |
execute()
Carry out the chmoding.
|
protected boolean |
isValidOs()
Check if the os is valid.
|
void |
setAddsourcefile(boolean b)
This is not allowed for Chmod.
|
void |
setCommand(Commandline cmdl)
Set the command.
|
void |
setDefaultexcludes(boolean useDefaultExcludes)
Sets whether default exclusions should be used or not.
|
void |
setDir(java.io.File src)
The directory which holds the files whose permissions must be changed.
|
void |
setExcludes(java.lang.String excludes)
Sets the set of exclude patterns.
|
void |
setExecutable(java.lang.String e)
Set the executable.
|
void |
setFile(java.io.File src)
The file or single directory of which the permissions must be changed.
|
void |
setIncludes(java.lang.String includes)
Sets the set of include patterns.
|
void |
setPerm(java.lang.String perm)
Set the new permissions.
|
void |
setProject(Project project)
Set the project of this task.
|
void |
setSkipEmptyFilesets(boolean skip)
This is not allowed for Chmod.
|
add, add, addDirset, addFilelist, addFileset, createHandler, createMapper, createSrcfile, createTargetfile, getCommandline, getCommandline, getDirs, getFiles, getFilesAndDirs, runExec, runParallel, setDest, setForce, setForwardslash, setIgnoremissing, setMaxParallel, setParallel, setRelative, setType, setupRedirector, setVerbose
addConfiguredRedirector, addEnv, createArg, createWatchdog, getOs, getOsFamily, getResolveExecutable, logFlush, maybeSetResultPropertyValue, prepareExec, resolveExecutable, runExecute, setAppend, setError, setErrorProperty, setFailIfExecutionFails, setFailonerror, setInput, setInputString, setLogError, setNewenvironment, setOs, setOsFamily, setOutput, setOutputproperty, setResolveExecutable, setResultProperty, setSearchPath, setSpawn, setTimeout, setTimeout, setVMLauncher
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
clone, getDescription, getLocation, getProject, setDescription, setLocation
public void setProject(Project project)
setProject
in class ProjectComponent
project
- the project for this task.ProjectComponent.setProject(org.apache.tools.ant.Project)
public void setFile(java.io.File src)
src
- the source file or directory.public void setDir(java.io.File src)
public void setPerm(java.lang.String perm)
perm
- the new permissions.public PatternSet.NameEntry createInclude()
public PatternSet.NameEntry createExclude()
public PatternSet createPatternSet()
public void setIncludes(java.lang.String includes)
includes
- the string containing the include patterns.public void setExcludes(java.lang.String excludes)
excludes
- the string containing the exclude patterns.public void setDefaultexcludes(boolean useDefaultExcludes)
useDefaultExcludes
- "true"|"on"|"yes" when default exclusions
should be used, "false"|"off"|"no" when they
shouldn't be used.protected void checkConfiguration()
checkConfiguration
in class ExecuteOn
public void execute() throws BuildException
execute
in class ExecTask
BuildException
- on error.public void setExecutable(java.lang.String e)
setExecutable
in class ExecTask
e
- ignored.BuildException
- always.public void setCommand(Commandline cmdl)
setCommand
in class ExecTask
cmdl
- ignored.BuildException
- always.public void setSkipEmptyFilesets(boolean skip)
setSkipEmptyFilesets
in class ExecuteOn
skip
- ignored.BuildException
- always.public void setAddsourcefile(boolean b)
setAddsourcefile
in class ExecuteOn
b
- ignored.BuildException
- always.