API Overview API Index Package Overview Direct link to this page
Apache Ant 1.7.1
  org.apache.tools.ant.taskdefs. Chmod View Source
Author(s)
Since
Ant 1.1
Version
Serial
Hierarchy
 Object
      ProjectComponent
          Task
              ExecTask
                  ExecuteOn
                      Chmod
Implements
Subclasses
Description
public class Chmod
  Chmod equivalent for unix-like environments.
See also:   
Constructors
public Chmod ()
Chmod task for setting file and directory permissions.
Methods
Hide/Show inherited methods
public void add (FileNameMapper fileNameMapper) [Inherited From ExecuteOn]
  Add a nested FileNameMapper.
public void add (ResourceCollection rc) [Inherited From ExecuteOn]
  Add a collection of resources upon which to operate.
public void addConfiguredRedirector (RedirectorElement redirectorElement) [Inherited From ExecTask]
  Add a RedirectorElement to this task.
public void addDirset (DirSet set) [Inherited From ExecuteOn]
  Add a set of directories upon which to operate.
public void addEnv (Variable var) [Inherited From ExecTask]
  Add an environment variable to the launched process.
public void addFilelist (FileList list) [Inherited From ExecuteOn]
  Add a list of source files upon which to operate.
public void addFileset (FileSet set) [Inherited From ExecuteOn]
  Add a set of files upon which to operate.
publicfinal void bindToOwner (Task owner) [Inherited From Task]
  Bind a task to another; use this when configuring a newly created task to do work on behalf of another.
protected void checkConfiguration () [Overrides ExecuteOn]
Check the attributes and nested elements.
public java.lang.Object clone () throws java.lang.CloneNotSupportedException [Inherited From ProjectComponent]
 
public Argument createArg () [Inherited From ExecTask]
  Adds a command-line argument.
public NameEntry createExclude ()
  Add a name entry on the exclude list.
protected ExecuteStreamHandler createHandler () throws BuildException [Inherited From ExecuteOn]
  Create the ExecuteStreamHandler instance that will be used during execution.
public NameEntry createInclude ()
  Add a name entry on the include list.
public Mapper createMapper () throws BuildException [Inherited From ExecuteOn]
  Create a nested Mapper element to use for mapping source files to target files.
public PatternSet createPatternSet ()
  Add a set of patterns.
public Marker createSrcfile () [Inherited From ExecuteOn]
  Create a placeholder indicating where on the command line the name of the source file should be inserted.
public Marker createTargetfile () [Inherited From ExecuteOn]
  Create a placeholder indicating where on the command line the name of the target file should be inserted.
protected ExecuteWatchdog createWatchdog () throws BuildException [Inherited From ExecTask]
  Create the Watchdog to kill a runaway process.
public void execute () throws BuildException [Overrides ExecTask]
  Carry out the chmoding.
protected java.lang.String getCommandline (java.lang.String srcFiles, java.io.File baseDirs) [Inherited From ExecuteOn]
  Construct the command line for parallel execution.
protected java.lang.String getCommandline (java.lang.String srcFile, java.io.File baseDir) [Inherited From ExecuteOn]
  Construct the command line for serial execution.
public java.lang.String getDescription () [Inherited From ProjectComponent]
  Returns the description of the current action.
protected java.lang.String getDirs (java.io.File baseDir, DirectoryScanner ds) [Inherited From ExecuteOn]
  Return the list of Directories from this DirectoryScanner that should be included on the command line.
protected java.lang.String getFiles (java.io.File baseDir, DirectoryScanner ds) [Inherited From ExecuteOn]
  Return the list of files from this DirectoryScanner that should be included on the command line.
protected java.lang.String getFilesAndDirs (FileList list) [Inherited From ExecuteOn]
  Return the list of files or directories from this FileList that should be included on the command line.
public Location getLocation () [Inherited From ProjectComponent]
  Returns the file/location where this task was defined.
public Target getOwningTarget () [Inherited From Task]
  Returns the container target of this task.
public Project getProject () [Inherited From ProjectComponent]
  Returns the project to which this component belongs.
public boolean getResolveExecutable () [Inherited From ExecTask]
  Indicates whether to attempt to resolve the executable to a file.
public RuntimeConfigurable getRuntimeConfigurableWrapper () [Inherited From Task]
  Returns the wrapper used for runtime configuration.
public java.lang.String getTaskName () [Inherited From Task]
  Returns the name to use in logging messages.
public java.lang.String getTaskType () [Inherited From Task]
  Return the type of task.
protected RuntimeConfigurable getWrapper () [Inherited From Task]
  Return the runtime configurable structure for this task.
protected void handleErrorFlush (java.lang.String output) [Inherited From Task]
  Handles an error line by logging it with the WARN priority.
protected void handleErrorOutput (java.lang.String output) [Inherited From Task]
  Handles an error output by logging it with the WARN priority.
protected void handleFlush (java.lang.String output) [Inherited From Task]
  Handles output by logging it with the INFO priority.
protected int handleInput (byte[] buffer, int offset, int length) throws java.io.IOException [Inherited From Task]
  Handle an input request by this task.
protected void handleOutput (java.lang.String output) [Inherited From Task]
  Handles output by logging it with the INFO priority.
public void init () throws BuildException [Inherited From Task]
  Called by the project to let the task initialize properly.
protectedfinal boolean isInvalid () [Inherited From Task]
  Has this task been marked invalid?
protected boolean isValidOs () [Overrides ExecTask]
  Check if the os is valid.
public void log (java.lang.String msg) [Inherited From Task]
  Logs a message with the default (INFO) priority.
public void log (java.lang.String msg, int msgLevel) [Inherited From Task]
  Logs a message with the given priority.
public void log (java.lang.String msg, java.lang.Throwable t, int msgLevel) [Inherited From Task]
  Logs a message with the given priority.
public void log (java.lang.Throwable t, int msgLevel) [Inherited From Task]
  Logs a message with the given priority.
protected void logFlush () [Inherited From ExecTask]
Flush the output stream - if there is one.
public void maybeConfigure () throws BuildException [Inherited From Task]
  Configures this task - if it hasn't been done already.
protected void maybeSetResultPropertyValue (int result) [Inherited From ExecTask]
  Helper method to set result property to the passed in value if appropriate.
publicfinal void perform () [Inherited From Task]
  Performs this task if it's still valid, or gets a replacement version and performs that otherwise.
protected Execute prepareExec () throws BuildException [Inherited From ExecTask]
  Create an Execute instance with the correct working directory set.
public void reconfigure () [Inherited From Task]
Force the task to be reconfigured from its RuntimeConfigurable.
protected java.lang.String resolveExecutable (java.lang.String exec, boolean mustSearchPath) [Inherited From ExecTask]
  The method attempts to figure out where the executable is so that we can feed the full path.
protected void runExec (Execute exe) throws BuildException [Inherited From ExecuteOn]
  Run the specified Execute object.
protectedfinal void runExecute (Execute exe) throws java.io.IOException [Inherited From ExecTask]
  A Utility method for this classes and subclasses to run an Execute instance (an external command).
protected void runParallel (Execute exe, java.util.Vector fileNames, java.util.Vector baseDirs) throws java.io.IOException BuildException [Inherited From ExecuteOn]
  Run the command in "parallel" mode, making sure that at most maxParallel sourcefiles get passed on the command line.
public void setAddsourcefile (boolean b) [Overrides ExecuteOn]
  This is not allowed for Chmod.
public void setAppend (boolean append) [Inherited From ExecTask]
  Set whether output should be appended to or overwrite an existing file.
public void setCommand (Commandline cmdl) [Overrides ExecTask]
  Set the command.
public void setDefaultexcludes (boolean useDefaultExcludes)
  Sets whether default exclusions should be used or not.
public void setDescription (java.lang.String desc) [Inherited From ProjectComponent]
  Sets a description of the current action.
public void setDest (java.io.File destDir) [Inherited From ExecuteOn]
  Specify the directory where target files are to be placed.
public void setDir (java.io.File src) [Overrides ExecTask]
  The directory which holds the files whose permissions must be changed.
public void setError (java.io.File error) [Inherited From ExecTask]
  Set the File to which the error stream of the process should be redirected.
public void setErrorProperty (java.lang.String errorProperty) [Inherited From ExecTask]
  Sets the name of the property whose value should be set to the error of the process.
public void setExcludes (java.lang.String excludes)
  Sets the set of exclude patterns.
public void setExecutable (java.lang.String e) [Overrides ExecTask]
  Set the executable.
public void setFailIfExecutionFails (boolean flag) [Inherited From ExecTask]
  Set whether to stop the build if program cannot be started.
public void setFailonerror (boolean fail) [Inherited From ExecTask]
  Fail if the command exits with a non-zero return code.
public void setFile (java.io.File src)
  The file or single directory of which the permissions must be changed.
public void setForce (boolean b) [Inherited From ExecuteOn]
  Set whether to bypass timestamp comparisons for target files.
public void setForwardslash (boolean forwardSlash) [Inherited From ExecuteOn]
  Set whether the source and target file names on Windows and OS/2 must use the forward slash as file separator.
public void setIgnoremissing (boolean b) [Inherited From ExecuteOn]
  Set whether to ignore nonexistent files from filelists.
public void setIncludes (java.lang.String includes)
  Sets the set of include patterns.
public void setInput (java.io.File input) [Inherited From ExecTask]
  Set the input file to use for the task.
public void setInputString (java.lang.String inputString) [Inherited From ExecTask]
  Set the string to use as input.
public void setLocation (Location location) [Inherited From ProjectComponent]
  Sets the file/location where this task was defined.
public void setLogError (boolean logError) [Inherited From ExecTask]
  Controls whether error output of exec is logged.
public void setMaxParallel (int max) [Inherited From ExecuteOn]
  Limit the command line length by passing at maximum this many sourcefiles at once to the command.
public void setNewenvironment (boolean newenv) [Inherited From ExecTask]
  Do not propagate old environment when new environment variables are specified.
public void setOs (java.lang.String os) [Inherited From ExecTask]
  List of operating systems on which the command may be executed.
public void setOsFamily (java.lang.String osFamily) [Inherited From ExecTask]
  Restrict this execution to a single OS Family
public void setOutput (java.io.File out) [Inherited From ExecTask]
  File the output of the process is redirected to.
public void setOutputproperty (java.lang.String outputProp) [Inherited From ExecTask]
  Sets the property name whose value should be set to the output of the process.
public void setOwningTarget (Target target) [Inherited From Task]
  Sets the target container of this task.
public void setParallel (boolean parallel) [Inherited From ExecuteOn]
  Set whether to execute in parallel mode.
public void setPerm (java.lang.String perm)
  Set the new permissions.
public void setProject (Project project) [Overrides ProjectComponent]
  Set the project of this task.
public void setRelative (boolean relative) [Inherited From ExecuteOn]
  Set whether the filenames should be passed on the command line as absolute or relative pathnames.
public void setResolveExecutable (boolean resolveExecutable) [Inherited From ExecTask]
  Set whether to attempt to resolve the executable to a file.
public void setResultProperty (java.lang.String resultProperty) [Inherited From ExecTask]
  Sets the name of a property in which the return code of the command should be stored.
public void setRuntimeConfigurableWrapper (RuntimeConfigurable wrapper) [Inherited From Task]
  Sets the wrapper to be used for runtime configuration.
public void setSearchPath (boolean searchPath) [Inherited From ExecTask]
  Set whether to search nested, then system PATH environment variables for the executable.
public void setSkipEmptyFilesets (boolean skip) [Overrides ExecuteOn]
  This is not allowed for Chmod.
public void setSpawn (boolean spawn) [Inherited From ExecTask]
  Set whether or not you want the process to be spawned.
public void setTaskName (java.lang.String name) [Inherited From Task]
  Sets the name to use in logging messages.
public void setTaskType (java.lang.String type) [Inherited From Task]
  Sets the name with which the task has been invoked.
public void setTimeout (java.lang.Integer value) [Inherited From ExecTask]
  Set the timeout in milliseconds after which the process will be killed.
public void setTimeout (java.lang.Long value) [Inherited From ExecTask]
  Set the timeout in milliseconds after which the process will be killed.
public void setType (FileDirBoth type) [Inherited From ExecuteOn]
  Set whether the command works only on files, directories or both.
protected void setupRedirector () [Inherited From ExecuteOn]
Set up the I/O Redirector.
public void setVerbose (boolean b) [Inherited From ExecuteOn]
  Set whether to operate in verbose mode.
public void setVMLauncher (boolean vmLauncher) [Inherited From ExecTask]
  Set whether to launch new process with VM, otherwise use the OS's shell.
Fields
Hide/Show inherited fields
protected Commandline cmdl [Inherited From ExecTask]
protected java.lang.String description [Inherited From ProjectComponent]
Description of this component, if any.
protected java.io.File destDir [Inherited From ExecuteOn]
protected boolean failOnError [Inherited From ExecTask]
protected java.util.Vector filesets [Inherited From ExecuteOn]
protected Location location [Inherited From ProjectComponent]
Location within the build file of this task definition.
protected FileNameMapper mapper [Inherited From ExecuteOn]
protected Mapper mapperElement [Inherited From ExecuteOn]
protected boolean newEnvironment [Inherited From ExecTask]
protected Project project [Inherited From ProjectComponent]
Project object of this component.
protected Redirector redirector [Inherited From ExecTask]
protected RedirectorElement redirectorElement [Inherited From ExecTask]
protected Marker srcFilePos [Inherited From ExecuteOn]
protected boolean srcIsFirst [Inherited From ExecuteOn]
Has <srcfile> been specified before <targetfile>
protected Target target [Inherited From Task]
Target this task belongs to, if any.
protected Marker targetFilePos [Inherited From ExecuteOn]
protected java.lang.String taskName [Inherited From Task]
  Name of this task to be used for logging purposes.
protected java.lang.String taskType [Inherited From Task]
Type of this task.
protected java.lang.String type [Inherited From ExecuteOn]
protected RuntimeConfigurable wrapper [Inherited From Task]
Wrapper for this object, used to configure it at runtime.
Nested Classes
  ExecuteOn.FileDirBoth
Enumerated attribute with the values "file", "dir" and "both" for the type attribute.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar