From 3d413edd0fca1aba4ff109d99d96702d828313b2 Mon Sep 17 00:00:00 2001 From: Gintas Grigelionis Date: Fri, 8 Jun 2018 20:17:29 +0200 Subject: [PATCH] Bz 22370: document the semantics of followsymlinks --- manual/Types/fileset.html | 17 ++++++++++++++--- manual/Types/selectors.html | 17 ++++++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/manual/Types/fileset.html b/manual/Types/fileset.html index 89fb14561..8c4ab55d0 100644 --- a/manual/Types/fileset.html +++ b/manual/Types/fileset.html @@ -33,7 +33,7 @@ addition, FileSet holds an implicit PatternSet and supports the nested <include>, <includesfile>, <exclude> and <excludesfile> elements of PatternSet directly, as well as PatternSet's attributes.

-

Selectors are available as nested elements within the FileSet. If any of the selectors +

Selectors are available as nested elements within the FileSet. If any of the selectors within the FileSet do not select the file, the file is not considered part of the FileSet. This makes a FileSet equivalent to an <and> selector container.

@@ -93,7 +93,7 @@ makes a FileSet equivalent to an <and> selector container.

@@ -102,9 +102,20 @@ makes a FileSet equivalent to an <and> selector container.

+

Ant is restricted to features that JRE considers portable, and symbolic links is one such feature +that was long considered non-portable. That has changed with Java 7 and NIO.2, yet full support for +symbolic links is still lacking (notably, in Zip files). Full support of symbolic links in Ant would +require a different implementation of FileSet and revision of all tasks and/or types that derive +from it. Currently, the semantics of followsymlinks in FileSet is such that false +excludes symbolic links completely, and true allows symbolic links to be considered by +selectors, which may have their own followsymlinks attributes with proper semantics; +i.e., false allows selector to inspect properties of a symbolic link itself, and true +those of its target. +

+

Examples

 <fileset dir="${server.src}" casesensitive="yes">
diff --git a/manual/Types/selectors.html b/manual/Types/selectors.html
index ef756a9a6..ca2213a71 100644
--- a/manual/Types/selectors.html
+++ b/manual/Types/selectors.html
@@ -925,11 +925,12 @@
         
- - - - - + + + + +
erroronmissingdir - Specify what happens if the base directory does not exist. If true a build error + Specify what happens if the base directory does not exist. If true a build error will happen, if false, the fileset will be ignored/empty. Since Apache Ant 1.7.1 Username of the expected owner Yes
followsymlinksMust the selector follow symbolic links?No; defaults to true
followsymlinksMust the selector follow symbolic links? (see also how the attribute interacts with the + corresponding attribute of the FileSet)No; defaults to true

PosixGroup Selector

@@ -954,7 +955,8 @@ followsymlinks - Must the selector follow symbolic links? + Must the selector follow symbolic links? (see also how the attribute interacts with the + corresponding attribute of the FileSet) No; defaults to true @@ -981,7 +983,8 @@ followsymlinks - Must the selector follow symbolic links? + Must the selector follow symbolic links? (see also how the attribute interacts with + the corresponding attribute of the FileSet) No; defaults to true