org.apache.tools.ant.taskdefs.optional.windows

Class Attrib


public class Attrib
extends ExecuteOn

Attrib equivalent for Win32 environments. Note: Attrib parameters /S and /D are not handled.

Since:
Ant 1.6

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.ExecuteOn

ExecuteOn.FileDirBoth

Field Summary

Fields inherited from class org.apache.tools.ant.taskdefs.ExecuteOn

destDir, filesets, mapper, mapperElement, srcFilePos, srcIsFirst, targetFilePos, type

Fields inherited from class org.apache.tools.ant.taskdefs.ExecTask

cmdl, failOnError, newEnvironment, redirector, redirectorElement

Fields inherited from class org.apache.tools.ant.Task

description, location, target, taskName, taskType, wrapper

Fields inherited from class org.apache.tools.ant.ProjectComponent

project

Constructor Summary

Attrib()
Sole constructor.

Method Summary

protected void
checkConfiguration()
Has the user set all necessary attributes?
protected boolean
isValidOs()
Is this the OS the user wanted?
void
setAddsourcefile(boolean b)
void
setArchive(boolean value)
set the Archive file attribute
void
setCommand(String e)
void
setExecutable(String e)
void
setFile(File src)
void
setHidden(boolean value)
set the Hidden file attribute
void
setMaxParallel(int max)
void
setParallel(boolean parallel)
void
setReadonly(boolean value)
set the ReadOnly file attribute
void
setSkipEmptyFilesets(boolean skip)
void
setSystem(boolean value)
set the System file attribute

Methods inherited from class org.apache.tools.ant.taskdefs.ExecuteOn

addDirset, addFilelist, addFileset, checkConfiguration, createHandler, createMapper, createSrcfile, createTargetfile, getCommandline, getCommandline, getDirs, getFiles, getFilesAndDirs, runExec, runParallel, setAddsourcefile, setDest, setForwardslash, setIgnoremissing, setMaxParallel, setParallel, setRelative, setSkipEmptyFilesets, setType, setVerbose, setupRedirector

Methods inherited from class org.apache.tools.ant.taskdefs.ExecTask

addConfiguredRedirector, addEnv, checkConfiguration, createArg, createHandler, createWatchdog, execute, getResolveExecutable, isValidOs, logFlush, maybeSetResultPropertyValue, prepareExec, resolveExecutable, runExec, runExecute, setAppend, setCommand, setDir, setError, setErrorProperty, setExecutable, setFailIfExecutionFails, setFailonerror, setInput, setInputString, setLogError, setNewenvironment, setOs, setOutput, setOutputproperty, setResolveExecutable, setResultProperty, setSpawn, setTimeout, setTimeout, setVMLauncher, setupRedirector

Methods inherited from class org.apache.tools.ant.Task

execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType

Methods inherited from class org.apache.tools.ant.ProjectComponent

getProject, log, log, setProject

Constructor Details

Attrib

public Attrib()
Sole constructor.

Method Details

checkConfiguration

protected void checkConfiguration()
Has the user set all necessary attributes?
Overrides:
checkConfiguration in interface ExecuteOn


isValidOs

protected boolean isValidOs()
Is this the OS the user wanted?
Overrides:
isValidOs in interface ExecTask

Returns:
boolean
  • true if the os under which ant is running is matches one os in the os attribute or if the os attribute is null
  • false otherwise.


setAddsourcefile

public void setAddsourcefile(boolean b)
Overrides:
setAddsourcefile in interface ExecuteOn


setArchive

public void setArchive(boolean value)
set the Archive file attribute


setCommand

public void setCommand(String e)


setExecutable

public void setExecutable(String e)
Overrides:
setExecutable in interface ExecTask


setFile

public void setFile(File src)


setHidden

public void setHidden(boolean value)
set the Hidden file attribute


setMaxParallel

public void setMaxParallel(int max)
Overrides:
setMaxParallel in interface ExecuteOn


setParallel

public void setParallel(boolean parallel)
Overrides:
setParallel in interface ExecuteOn


setReadonly

public void setReadonly(boolean value)
set the ReadOnly file attribute


setSkipEmptyFilesets

public void setSkipEmptyFilesets(boolean skip)
Overrides:
setSkipEmptyFilesets in interface ExecuteOn


setSystem

public void setSystem(boolean value)
set the System file attribute


Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.