Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.optional.windows

public Class Attrib

extends ExecuteOn
Class Inheritance
Imports
java.io.File, org.apache.tools.ant.BuildException, org.apache.tools.ant.taskdefs.ExecuteOn, org.apache.tools.ant.taskdefs.condition.Os, org.apache.tools.ant.types.FileSet

Attrib equivalent for Win32 environments.

Note

Attrib parameters /S and /D are not handled.

Since
Ant 1.6

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final String
private static final String
private boolean
private static final String
private static final String
Inherited from org.apache.tools.ant.taskdefs.ExecuteOn:
destDirfilesetsmappermapperElementsrcFilePossrcIsFirsttargetFilePostype

Constructor Summary

AccessConstructor and Description
public
Attrib()

Constructor for Attrib.

Method Summary

Modifier and TypeMethod and Description
private void
addArg(boolean sign, String attribute)

protected void
private static String
getSignString(boolean attr)

private boolean
protected boolean

Returns:

true if the os is valid.
isValidOs
()

Overrides org.apache.tools.ant.taskdefs.ExecTask.isValidOs.

Check if the os is valid.
public void
public void
setArchive(boolean
a boolean value
value
)

Set the Archive file attribute.

public void
setCommand(String
ignored
e
)

Set the executable.

public void
public void
setFile(File
a file
src
)

A file to be attribed.

public void
setHidden(boolean
a boolean value
value
)

Set the Hidden file attribute.

public void
setMaxParallel(int
ignored
max
)

Overrides org.apache.tools.ant.taskdefs.ExecuteOn.setMaxParallel.

Set max parallel.
public void
setParallel(boolean
ignored
parallel
)

Overrides org.apache.tools.ant.taskdefs.ExecuteOn.setParallel.

Set parallel.
public void
setReadonly(boolean
a boolean value
value
)

Set the ReadOnly file attribute.

public void
setSkipEmptyFilesets(boolean
ignored
skip
)

Overrides org.apache.tools.ant.taskdefs.ExecuteOn.setSkipEmptyFilesets.

Set skip empty file sets.
public void
setSystem(boolean
a boolean value
value
)

Set the System file attribute.

Inherited from org.apache.tools.ant.taskdefs.ExecuteOn:
addaddaddDirsetaddFilelistaddFilesetcreateHandlercreateMappercreateSrcfilecreateTargetfilegetCommandlinegetCommandlinegetDirsgetFilesgetFilesAndDirsrunExecrunParallelsetDestsetForcesetForwardslashsetIgnoremissingsetRelativesetTypesetupRedirectorsetVerbose

Field Detail

ATTR_ARCHIVEback to summary
private static final String ATTR_ARCHIVE
ATTR_HIDDENback to summary
private static final String ATTR_HIDDEN
ATTR_READONLYback to summary
private static final String ATTR_READONLY
ATTR_SYSTEMback to summary
private static final String ATTR_SYSTEM
haveAttrback to summary
private boolean haveAttr
SETback to summary
private static final String SET
UNSETback to summary
private static final String UNSET

Constructor Detail

Attribback to summary
public Attrib()

Constructor for Attrib.

Method Detail

addArgback to summary
private void addArg(boolean sign, String attribute)
checkConfigurationback to summary
protected void checkConfiguration()

Overrides org.apache.tools.ant.taskdefs.ExecuteOn.checkConfiguration.

Check the attributes.

Annotations
@Override
getSignStringback to summary
private static String getSignString(boolean attr)
haveAttrback to summary
private boolean haveAttr()
isValidOsback to summary
protected boolean isValidOs()

Overrides org.apache.tools.ant.taskdefs.ExecTask.isValidOs.

Check if the os is valid. Default is to allow windows

Returns:boolean

true if the os is valid.

Annotations
@Override
setAddsourcefileback to summary
public void setAddsourcefile(boolean b)

Overrides org.apache.tools.ant.taskdefs.ExecuteOn.setAddsourcefile.

Add source file. This is not allowed, and it always throws a BuildException.

Parameters
b:boolean

ignored

Annotations
@Override
setArchiveback to summary
public void setArchive(boolean value)

Set the Archive file attribute.

Parameters
value:boolean

a boolean value

setCommandback to summary
public void setCommand(String e)

Set the executable. This is not allowed, and it always throws a BuildException.

Parameters
e:String

ignored

setExecutableback to summary
public void setExecutable(String e)

Overrides org.apache.tools.ant.taskdefs.ExecTask.setExecutable.

Set the executable. This is not allowed, and it always throws a BuildException.

Parameters
e:String

ignored

Annotations
@Override
setFileback to summary
public void setFile(File src)

A file to be attribed.

Parameters
src:File

a file

setHiddenback to summary
public void setHidden(boolean value)

Set the Hidden file attribute.

Parameters
value:boolean

a boolean value

setMaxParallelback to summary
public void setMaxParallel(int max)

Overrides org.apache.tools.ant.taskdefs.ExecuteOn.setMaxParallel.

Set max parallel. This is not allowed, and it always throws a BuildException.

Parameters
max:int

ignored

Annotations
@Override
setParallelback to summary
public void setParallel(boolean parallel)

Overrides org.apache.tools.ant.taskdefs.ExecuteOn.setParallel.

Set parallel. This is not allowed, and it always throws a BuildException.

Parameters
parallel:boolean

ignored

Annotations
@Override
setReadonlyback to summary
public void setReadonly(boolean value)

Set the ReadOnly file attribute.

Parameters
value:boolean

a boolean value

setSkipEmptyFilesetsback to summary
public void setSkipEmptyFilesets(boolean skip)

Overrides org.apache.tools.ant.taskdefs.ExecuteOn.setSkipEmptyFilesets.

Set skip empty file sets. This is not allowed, and it always throws a BuildException.

Parameters
skip:boolean

ignored

Annotations
@Override
setSystemback to summary
public void setSystem(boolean value)

Set the System file attribute.

Parameters
value:boolean

a boolean value