Top Description Inners Fields Constructors Methods
org.apache.tools.ant.taskdefs

public Class Tar

extends MatchingTask
Class Inheritance
Imports
java.io.BufferedOutputStream, .File, .IOException, .InputStream, .OutputStream, java.lang.reflect.Constructor, .InvocationTargetException, java.nio.file.Files, java.util.Collection, .HashMap, .HashSet, .List, .Map, .Set, .Vector, java.util.zip.GZIPOutputStream, org.apache.tools.ant.BuildException, .DirectoryScanner, .Project, org.apache.tools.ant.types.ArchiveFileSet, .EnumeratedAttribute, .FileSet, .Resource, .ResourceCollection, org.apache.tools.ant.types.resources.ArchiveResource, .FileProvider, .FileResource, .TarResource, org.apache.tools.ant.types.selectors.SelectorUtils, org.apache.tools.ant.util.FileUtils, .MergingMapper, .ResourceUtils, .SourceFileScanner, org.apache.tools.bzip2.CBZip2OutputStream, org.apache.tools.tar.TarConstants, .TarEntry, .TarOutputStream

Creates a tar archive.
Since
Ant 1.1

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Tar.TarCompressionMethod

Valid Modes for Compression attribute to Tar Task

public static class
Tar.TarFileSet

This is a FileSet with the option to specify permissions and other attributes.

public static class
Tar.TarLongFileMode

Set of options for long file handling in the task.

Field Summary

Modifier and TypeField and Description
pack-priv File
private static final int
private Tar.TarCompressionMethod
private String
encoding

Encoding to use for filenames, defaults to the platform's default encoding.

public static final String
FAIL

Deprecated since 1.5.x. Tar.FAIL is deprecated and is replaced with Tar.TarLongFileMode.FAIL
pack-priv Vector<Tar.TarFileSet>
public static final String
GNU

Deprecated since 1.5.x. Tar.GNU is deprecated and is replaced with Tar.TarLongFileMode.GNU
private Tar.TarLongFileMode
private boolean
longWarningGiven

Indicates whether the user has been warned about long files already.

public static final String
OMIT

Deprecated since 1.5.x. Tar.OMIT is deprecated and is replaced with Tar.TarLongFileMode.OMIT
private final List<ResourceCollection>
pack-priv File
public static final String
TRUNCATE

Deprecated since 1.5.x. Tar.TRUNCATE is deprecated and is replaced with Tar.TarLongFileMode.TRUNCATE
public static final String
WARN

Deprecated since 1.5.x. Tar.WARN is deprecated and is replaced with Tar.TarLongFileMode.WARN
Inherited from org.apache.tools.ant.taskdefs.MatchingTask:
fileset

Constructor Summary

AccessConstructor and Description
public
Tar()

Method Summary

Modifier and TypeMethod and Description
public void
add(final ResourceCollection
a resource collection to archive.
res
)

Add a collection of resources to archive.

protected boolean

Returns:

true if the archive is up to date.
archiveIsUpToDate
(final String[]
the files to check
files
)

Deprecated since 1.5.x. use the two-arg version instead.
Is the archive up to date in relationship to a list of files.
protected boolean

Returns:

true if the archive is up to date.
archiveIsUpToDate
(final String[]
the files to check
files
,
final File
the base directory for the files.
dir
)

Is the archive up to date in relationship to a list of files.

protected boolean

Returns:

true if the archive is up to date.
archiveIsUpToDate
(final Resource
the files to check
r
)

Is the archive up to date in relationship to a list of files.

protected Tar.TarFileSet

Returns:

a new TarFileSet.
asTarFileSet
(final ArchiveFileSet
fileset to copy attributes from, may be null
archiveFileSet
)

Copies fullpath, prefix and permission attributes from the ArchiveFileSet to a new TarFileSet (or returns it unchanged if it already is a TarFileSet).

protected boolean

Returns:

whether the archive is up-to-date
check
(final ResourceCollection
the resource collection to check
rc
)

Checks whether the archive is out-of-date with respect to the resources of the given collection.

protected boolean

Returns:

whether the archive is up-to-date
check
(final File
base directory for file names
basedir
,
final String[]
array of relative file names
files
)

Checks whether the archive is out-of-date with respect to the given files, ensures that the archive won't contain itself.

protected boolean

Returns:

whether the archive is up-to-date
check
(final File
base directory for file names
basedir
,
final Collection<String>
array of relative file names
files
)

Checks whether the archive is out-of-date with respect to the given files, ensures that the archive won't contain itself.

public Tar.TarFileSet

Returns:

the tar fileset to be used as the nested element.
createTarFileSet
()

Add a new fileset with the option to specify permissions

public void
execute()

Overrides org.apache.tools.ant.Task.execute.

do the business
private static String
protected static String[]

Returns:

a list of the filenames.
getFileNames
(final FileSet
the fileset to operate on.
fs
)

Grabs all included files and directors from the FileSet and returns them as an array of (relative) file names.

protected static boolean

Returns:

true if the collection is a fileset.
isFileFileSet
(final ResourceCollection
the resource collection to check.
rc
)

whether the given resource collection is a (subclass of) FileSet that only contains file system resources.

public void
setBasedir(final File
the base directory.
baseDir
)

This is the base directory to look in for things to tar.

public void
setCompression(final Tar.TarCompressionMethod
the compression method.
mode
)

Set compression method.

public void
setDestFile(final File
The output of the tar
destFile
)

Set is the name/location of where to create the tar file.

public void
setEncoding(final String
the encoding name
encoding
)

Encoding to use for filenames, defaults to the platform's default encoding.

public void
setLongfile(final String
the mode string to handle long files.
mode
)

Deprecated since 1.5.x.
Set how to handle long files, those with a path>100 chars.
public void
setLongfile(final Tar.TarLongFileMode
the mode to handle long file names.
mode
)

Set how to handle long files, those with a path>100 chars.

public void
setTarfile(final File
the location of the tar file.
tarFile
)

Deprecated since 1.5.x. For consistency with other tasks, please use setDestFile().
Set is the name/location of where to create the tar file.
protected boolean

Returns:

true for this task.
supportsNonFileResources
()

Whether this task can deal with non-file resources.

protected void
tar(final ResourceCollection
the collection containing resources to add
rc
,
final TarOutputStream
stream writing to the archive.
tOut
)

Adds the resources contained in this collection to the archive.

protected void
tarFile(final File
the file to tar
file
,
final TarOutputStream
the output stream
tOut
,
final String
the path name of the file to tar
vPath
,
final Tar.TarFileSet
the fileset that the file came from.
tarFileSet
)

tar a file

protected void
tarResource(final Resource
the resource to tar
r
,
final TarOutputStream
the output stream
tOut
,
String
the path name of the file to tar
vPath
,
final Tar.TarFileSet
the fileset that the file came from, may be null.
tarFileSet
)

tar a resource

Inherited from org.apache.tools.ant.taskdefs.MatchingTask:
addaddAndaddContainsaddContainsRegexpaddCustomaddDateaddDependaddDepthaddDifferentaddFilenameaddMajorityaddModifiedaddNoneaddNotaddOraddPresentaddSelectoraddSizeaddTypeappendSelectorcreateExcludecreateExcludesFilecreateIncludecreateIncludesFilecreatePatternSetgetDirectoryScannergetImplicitFileSetgetSelectorshasSelectorsselectorCountselectorElementssetCaseSensitivesetDefaultexcludessetExcludessetExcludesfilesetFollowSymlinkssetIncludessetIncludesfilesetProjectXsetIgnoreXsetItems

Field Detail

baseDirback to summary
pack-priv File baseDir
BUFFER_SIZEback to summary
private static final int BUFFER_SIZE
compressionback to summary
private Tar.TarCompressionMethod compression
encodingback to summary
private String encoding

Encoding to use for filenames, defaults to the platform's default encoding.

FAILback to summary
public static final String FAIL

Deprecated

since 1.5.x. Tar.FAIL is deprecated and is replaced with Tar.TarLongFileMode.FAIL

Annotations
@Deprecated
filesetsback to summary
pack-priv Vector<Tar.TarFileSet> filesets
GNUback to summary
public static final String GNU

Deprecated

since 1.5.x. Tar.GNU is deprecated and is replaced with Tar.TarLongFileMode.GNU

Annotations
@Deprecated
longFileModeback to summary
private Tar.TarLongFileMode longFileMode
longWarningGivenback to summary
private boolean longWarningGiven

Indicates whether the user has been warned about long files already.

OMITback to summary
public static final String OMIT

Deprecated

since 1.5.x. Tar.OMIT is deprecated and is replaced with Tar.TarLongFileMode.OMIT

Annotations
@Deprecated
resourceCollectionsback to summary
private final List<ResourceCollection> resourceCollections
tarFileback to summary
pack-priv File tarFile
TRUNCATEback to summary
public static final String TRUNCATE

Deprecated

since 1.5.x. Tar.TRUNCATE is deprecated and is replaced with Tar.TarLongFileMode.TRUNCATE

Annotations
@Deprecated
WARNback to summary
public static final String WARN

Deprecated

since 1.5.x. Tar.WARN is deprecated and is replaced with Tar.TarLongFileMode.WARN

Annotations
@Deprecated

Constructor Detail

Tarback to summary
public Tar()

Method Detail

addback to summary
public void add(final ResourceCollection res)

Add a collection of resources to archive.

Parameters
res:ResourceCollection

a resource collection to archive.

Since
Ant 1.7
archiveIsUpToDateback to summary
protected boolean archiveIsUpToDate(final String[] files)

Deprecated

since 1.5.x. use the two-arg version instead.

Is the archive up to date in relationship to a list of files.

Parameters
files:String[]

the files to check

Returns:boolean

true if the archive is up to date.

Annotations
@Deprecated
archiveIsUpToDateback to summary
protected boolean archiveIsUpToDate(final String[] files, final File dir)

Is the archive up to date in relationship to a list of files.

Parameters
files:String[]

the files to check

dir:File

the base directory for the files.

Returns:boolean

true if the archive is up to date.

Since
Ant 1.5.2
archiveIsUpToDateback to summary
protected boolean archiveIsUpToDate(final Resource r)

Is the archive up to date in relationship to a list of files.

Parameters
r:Resource

the files to check

Returns:boolean

true if the archive is up to date.

Since
Ant 1.7
asTarFileSetback to summary
protected Tar.TarFileSet asTarFileSet(final ArchiveFileSet archiveFileSet)

Copies fullpath, prefix and permission attributes from the ArchiveFileSet to a new TarFileSet (or returns it unchanged if it already is a TarFileSet).

Parameters
archiveFileSet:ArchiveFileSet

fileset to copy attributes from, may be null

Returns:Tar.TarFileSet

a new TarFileSet.

Since
Ant 1.7
checkback to summary
protected boolean check(final ResourceCollection rc)

Checks whether the archive is out-of-date with respect to the resources of the given collection.

Also checks that either all collections only contain file resources or this class supports non-file collections.

And - in case of file-collections - ensures that the archive won't contain itself.

Parameters
rc:ResourceCollection

the resource collection to check

Returns:boolean

whether the archive is up-to-date

Since
Ant 1.7
checkback to summary
protected boolean check(final File basedir, final String[] files)

Checks whether the archive is out-of-date with respect to the given files, ensures that the archive won't contain itself.

Parameters
basedir:File

base directory for file names

files:String[]

array of relative file names

Returns:boolean

whether the archive is up-to-date

Since
Ant 1.7
checkback to summary
protected boolean check(final File basedir, final Collection<String> files)

Checks whether the archive is out-of-date with respect to the given files, ensures that the archive won't contain itself.

Parameters
basedir:File

base directory for file names

files:Collection<String>

array of relative file names

Returns:boolean

whether the archive is up-to-date

Since
Ant 1.9.5
See Also
check(File, String[])
createTarFileSetback to summary
public Tar.TarFileSet createTarFileSet()

Add a new fileset with the option to specify permissions

Returns:Tar.TarFileSet

the tar fileset to be used as the nested element.

executeback to summary
public void execute() throws BuildException

Overrides org.apache.tools.ant.Task.execute.

do the business

Annotations
@Override
Exceptions
BuildException:
on error
getCanonicalPrefixback to summary
private static String getCanonicalPrefix(Tar.TarFileSet tarFileSet, Project project)
getFileNamesback to summary
protected static String[] getFileNames(final FileSet fs)

Grabs all included files and directors from the FileSet and returns them as an array of (relative) file names.

Parameters
fs:FileSet

the fileset to operate on.

Returns:String[]

a list of the filenames.

Since
Ant 1.7
isFileFileSetback to summary
protected static boolean isFileFileSet(final ResourceCollection rc)

whether the given resource collection is a (subclass of) FileSet that only contains file system resources.

Parameters
rc:ResourceCollection

the resource collection to check.

Returns:boolean

true if the collection is a fileset.

Since
Ant 1.7
setBasedirback to summary
public void setBasedir(final File baseDir)

This is the base directory to look in for things to tar.

Parameters
baseDir:File

the base directory.

setCompressionback to summary
public void setCompression(final Tar.TarCompressionMethod mode)

Set compression method. Allowable values are

  • none - no compression
  • gzip - Gzip compression
  • bzip2 - Bzip2 compression
  • xz - XZ compression, requires XZ for Java
Parameters
mode:Tar.TarCompressionMethod

the compression method.

setDestFileback to summary
public void setDestFile(final File destFile)

Set is the name/location of where to create the tar file.

Parameters
destFile:File

The output of the tar

Since
Ant 1.5
setEncodingback to summary
public void setEncoding(final String encoding)

Encoding to use for filenames, defaults to the platform's default encoding.

For a list of possible values see https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html.

Parameters
encoding:String

the encoding name

Since
Ant 1.9.5
setLongfileback to summary
public void setLongfile(final String mode)

Deprecated

since 1.5.x. setLongFile(String) is deprecated and is replaced with setLongFile(Tar.TarLongFileMode) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the mode in its own class.

Set how to handle long files, those with a path>100 chars. Optional, default=warn.

Allowable values are

  • truncate - paths are truncated to the maximum length
  • fail - paths greater than the maximum cause a build exception
  • warn - paths greater than the maximum cause a warning and GNU is used
  • gnu - GNU extensions are used for any paths greater than the maximum.
  • omit - paths greater than the maximum are omitted from the archive
Parameters
mode:String

the mode string to handle long files.

Annotations
@Deprecated
setLongfileback to summary
public void setLongfile(final Tar.TarLongFileMode mode)

Set how to handle long files, those with a path>100 chars. Optional, default=warn.

Allowable values are

  • truncate - paths are truncated to the maximum length
  • fail - paths greater than the maximum cause a build exception
  • warn - paths greater than the maximum cause a warning and GNU is used
  • gnu - extensions used by older versions of GNU tar are used for any paths greater than the maximum.
  • posix - use POSIX PAX extension headers for any paths greater than the maximum. Supported by all modern tar implementations.
  • omit - paths greater than the maximum are omitted from the archive
Parameters
mode:Tar.TarLongFileMode

the mode to handle long file names.

setTarfileback to summary
public void setTarfile(final File tarFile)

Deprecated

since 1.5.x. For consistency with other tasks, please use setDestFile().

Set is the name/location of where to create the tar file.

Parameters
tarFile:File

the location of the tar file.

Annotations
@Deprecated
supportsNonFileResourcesback to summary
protected boolean supportsNonFileResources()

Whether this task can deal with non-file resources.

This implementation returns true only if this task is <tar>. Any subclass of this class that also wants to support non-file resources needs to override this method. We need to do so for backwards compatibility reasons since we can't expect subclasses to support resources.

Returns:boolean

true for this task.

Since
Ant 1.7
tarback to summary
protected void tar(final ResourceCollection rc, final TarOutputStream tOut) throws IOException

Adds the resources contained in this collection to the archive.

Uses the file based methods for file resources for backwards compatibility.

Parameters
rc:ResourceCollection

the collection containing resources to add

tOut:TarOutputStream

stream writing to the archive.

Exceptions
IOException:
on error.
Since
Ant 1.7
tarFileback to summary
protected void tarFile(final File file, final TarOutputStream tOut, final String vPath, final Tar.TarFileSet tarFileSet) throws IOException

tar a file

Parameters
file:File

the file to tar

tOut:TarOutputStream

the output stream

vPath:String

the path name of the file to tar

tarFileSet:Tar.TarFileSet

the fileset that the file came from.

Exceptions
IOException:
on error
tarResourceback to summary
protected void tarResource(final Resource r, final TarOutputStream tOut, String vPath, final Tar.TarFileSet tarFileSet) throws IOException

tar a resource

Parameters
r:Resource

the resource to tar

tOut:TarOutputStream

the output stream

vPath:String

the path name of the file to tar

tarFileSet:Tar.TarFileSet

the fileset that the file came from, may be null.

Exceptions
IOException:
on error
Since
Ant 1.7
org.apache.tools.ant.taskdefs back to summary

public final Class Tar.TarCompressionMethod

extends EnumeratedAttribute
Class Inheritance

Valid Modes for Compression attribute to Tar Task

Field Summary

Modifier and TypeField and Description
private static final String
BZIP2

BZIP2 compression

private static final String
GZIP

GZIP compression

private static final String
NONE

No compression

private static final String
XZ

XZ compression

Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
value

Constructor Summary

AccessConstructor and Description
public
TarCompressionMethod()

Default constructor

Method Summary

Modifier and TypeMethod and Description
private OutputStream

Returns:

output stream with on-the-fly compression
compress
(final OutputStream
output stream
ostream
)

This method wraps the output stream with the corresponding compression method

public String[]

Returns:

valid enumeration values
getValues
()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

Get valid enumeration values.
private static OutputStream
Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
containsValuegetIndexgetInstancegetValueindexOfValuesetValuetoString

Field Detail

BZIP2back to summary
private static final String BZIP2

BZIP2 compression

GZIPback to summary
private static final String GZIP

GZIP compression

NONEback to summary
private static final String NONE

No compression

XZback to summary
private static final String XZ

XZ compression

Since
1.10.1

Constructor Detail

TarCompressionMethodback to summary
public TarCompressionMethod()

Default constructor

Method Detail

compressback to summary
private OutputStream compress(final OutputStream ostream) throws IOException

This method wraps the output stream with the corresponding compression method

Parameters
ostream:OutputStream

output stream

Returns:OutputStream

output stream with on-the-fly compression

Exceptions
IOException:
thrown if file is not writable
getValuesback to summary
public String[] getValues()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

Get valid enumeration values.

Returns:String[]

valid enumeration values

Annotations
@Override
newXZOutputStreamback to summary
private static OutputStream newXZOutputStream(OutputStream ostream) throws BuildException
org.apache.tools.ant.taskdefs back to summary

public Class Tar.TarFileSet

extends TarFileSet
Class Inheritance

This is a FileSet with the option to specify permissions and other attributes.

Field Summary

Modifier and TypeField and Description
private String[]
private boolean

Constructor Summary

AccessConstructor and Description
public
TarFileSet(final FileSet
a FileSet value
fileset
)

Creates a new TarFileSet instance.

public
TarFileSet()

Creates a new TarFileSet instance.

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

a list of file and directory names, relative to the baseDir for the project.
getFiles
(final Project
the current project.
p
)

Get a list of files and directories specified in the fileset.

public int

Returns:

the current mode.
getMode
()

public boolean

Returns:

the leading slashes flag.
getPreserveLeadingSlashes
()

public void
setMode(final String
a 3 digit octal string.
octalString
)

A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0644

public void
setPreserveLeadingSlashes(final boolean
the leading slashes flag.
b
)

Flag to indicates whether leading `/'s should be preserved in the file names.

Inherited from org.apache.tools.ant.types.TarFileSet:
cloneconfigureFileSetgetGidgetGroupgetRefgetRefgetUidgetUserNamehasGroupBeenSethasGroupIdBeenSethasUserIdBeenSethasUserNameBeenSetnewArchiveScannersetGidsetGroupsetRefidsetUidsetUserName

Field Detail

filesback to summary
private String[] files
preserveLeadingSlashesback to summary
private boolean preserveLeadingSlashes

Constructor Detail

TarFileSetback to summary
public TarFileSet(final FileSet fileset)

Creates a new TarFileSet instance. Using a fileset as a constructor argument.

Parameters
fileset:FileSet

a FileSet value

TarFileSetback to summary
public TarFileSet()

Creates a new TarFileSet instance.

Method Detail

getFilesback to summary
public String[] getFiles(final Project p)

Get a list of files and directories specified in the fileset.

Parameters
p:Project

the current project.

Returns:String[]

a list of file and directory names, relative to the baseDir for the project.

getModeback to summary
public int getMode()
Returns:int

the current mode.

getPreserveLeadingSlashesback to summary
public boolean getPreserveLeadingSlashes()
Returns:boolean

the leading slashes flag.

setModeback to summary
public void setMode(final String octalString)

A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0644

Parameters
octalString:String

a 3 digit octal string.

setPreserveLeadingSlashesback to summary
public void setPreserveLeadingSlashes(final boolean b)

Flag to indicates whether leading `/'s should be preserved in the file names. Optional, default is false.

Parameters
b:boolean

the leading slashes flag.

org.apache.tools.ant.taskdefs back to summary

public Class Tar.TarLongFileMode

extends EnumeratedAttribute
Class Inheritance

Set of options for long file handling in the task.

Field Summary

Modifier and TypeField and Description
public static final String
FAIL

permissible values for longfile attribute

public static final String
GNU

permissible values for longfile attribute

public static final String
OMIT

permissible values for longfile attribute

public static final String
POSIX

permissible values for longfile attribute

public static final String
TRUNCATE

permissible values for longfile attribute

private static final String[]
public static final String
WARN

permissible values for longfile attribute

Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
value

Constructor Summary

AccessConstructor and Description
public
TarLongFileMode()

Constructor, defaults to "warn"

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

the possible values for this enumerated type.
getValues
()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

This is the only method a subclass needs to implement.
public boolean

Returns:

true if value is "fail".
isFailMode
()

public boolean

Returns:

true if value is "gnu".
isGnuMode
()

public boolean

Returns:

true if value is "omit".
isOmitMode
()

public boolean

Returns:

true if value is "posix".
isPosixMode
()

public boolean

Returns:

true if value is "truncate".
isTruncateMode
()

public boolean

Returns:

true if value is "warn".
isWarnMode
()

Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
containsValuegetIndexgetInstancegetValueindexOfValuesetValuetoString

Field Detail

FAILback to summary
public static final String FAIL

permissible values for longfile attribute

GNUback to summary
public static final String GNU

permissible values for longfile attribute

OMITback to summary
public static final String OMIT

permissible values for longfile attribute

POSIXback to summary
public static final String POSIX

permissible values for longfile attribute

TRUNCATEback to summary
public static final String TRUNCATE

permissible values for longfile attribute

VALID_MODESback to summary
private static final String[] VALID_MODES
WARNback to summary
public static final String WARN

permissible values for longfile attribute

Constructor Detail

TarLongFileModeback to summary
public TarLongFileMode()

Constructor, defaults to "warn"

Method Detail

getValuesback to summary
public String[] getValues()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

Doc from org.apache.tools.ant.types.EnumeratedAttribute.getValues.

This is the only method a subclass needs to implement.

Returns:String[]

the possible values for this enumerated type.

Annotations
@Override
isFailModeback to summary
public boolean isFailMode()
Returns:boolean

true if value is "fail".

isGnuModeback to summary
public boolean isGnuMode()
Returns:boolean

true if value is "gnu".

isOmitModeback to summary
public boolean isOmitMode()
Returns:boolean

true if value is "omit".

isPosixModeback to summary
public boolean isPosixMode()
Returns:boolean

true if value is "posix".

isTruncateModeback to summary
public boolean isTruncateMode()
Returns:boolean

true if value is "truncate".

isWarnModeback to summary
public boolean isWarnMode()
Returns:boolean

true if value is "warn".