This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
The following commit(s) were added to refs/heads/master by this push: new d77e762 Sort members. d77e762 is described below commit d77e762fa2fc7af9df56f035e48ee6d8cf87437f Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sat Sep 26 17:23:47 2020 -0400 Sort members. --- .../java/org/apache/commons/vfs2/FileName.java | 112 ++++++++++----------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileName.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileName.java index fcca329..b8933a8 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileName.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileName.java @@ -50,6 +50,38 @@ public interface FileName extends Comparable<FileName> { String getBaseName(); /** + * Returns the depth of this file name, within its file system. The depth of the root of a file system is 0. The + * depth of any other file is 1 + the depth of its parent. + * + * @return The depth of this file name. + */ + int getDepth(); + + /** + * Returns the extension of this file name. + * + * @return The extension. Returns an empty string if the name has no extension. + */ + String getExtension(); + + /** + * Returns a "friendly path", this is a path without a password. + * <p> + * This path can not be used to resolve the path again. + * </p> + * + * @return the friendly URI as a String. + */ + String getFriendlyURI(); + + /** + * Returns the file name of the parent of this file. The root of a file system has no parent. + * + * @return A {@link FileName} object representing the parent name. Returns null for the root of a file system. + */ + FileName getParent(); + + /** * Returns the absolute path of this file, within its file system. This path is normalized, so that {@code .} and * {@code ..} elements have been removed. Also, the path only contains {@code /} as its separator character. The * path always starts with {@code /} @@ -78,33 +110,20 @@ public interface FileName extends Comparable<FileName> { String getPathDecoded() throws FileSystemException; /** - * Returns the extension of this file name. - * - * @return The extension. Returns an empty string if the name has no extension. - */ - String getExtension(); - - /** - * Returns the depth of this file name, within its file system. The depth of the root of a file system is 0. The - * depth of any other file is 1 + the depth of its parent. - * - * @return The depth of this file name. - */ - int getDepth(); - - /** - * Returns the URI scheme of this file. + * Converts a file name to a relative name, relative to this file name. * - * @return The URI scheme of this file. + * @param name The name to convert to a relative path. + * @return The relative name. + * @throws FileSystemException On error. */ - String getScheme(); + String getRelativeName(FileName name) throws FileSystemException; /** - * Returns the absolute URI of this file. + * Finds the root of the file system. * - * @return the absolute URI of this file. + * @return the file system root. */ - String getURI(); + FileName getRoot(); /** * Returns the root URI of the file system this file belongs to. @@ -114,27 +133,32 @@ public interface FileName extends Comparable<FileName> { String getRootURI(); /** - * Finds the root of the file system. + * Returns the URI scheme of this file. * - * @return the file system root. + * @return The URI scheme of this file. */ - FileName getRoot(); + String getScheme(); /** - * Returns the file name of the parent of this file. The root of a file system has no parent. + * Returns the requested or current type of this name. + * <p> + * The "requested" type is the one determined during resolving the name. In this case the name is a + * {@link FileType#FOLDER} if it ends with an "/" else it will be a {@link FileType#FILE}. + * </p> + * <p> + * Once attached it will be changed to reflect the real type of this resource. + * </p> * - * @return A {@link FileName} object representing the parent name. Returns null for the root of a file system. + * @return {@link FileType#FOLDER} or {@link FileType#FILE} */ - FileName getParent(); + FileType getType(); /** - * Converts a file name to a relative name, relative to this file name. + * Returns the absolute URI of this file. * - * @param name The name to convert to a relative path. - * @return The relative name. - * @throws FileSystemException On error. + * @return the absolute URI of this file. */ - String getRelativeName(FileName name) throws FileSystemException; + String getURI(); /** * Determines if another file name is an ancestor of this file name. @@ -171,28 +195,4 @@ public interface FileName extends Comparable<FileName> { * @since 2.1 */ boolean isFile() throws FileSystemException; - - /** - * Returns the requested or current type of this name. - * <p> - * The "requested" type is the one determined during resolving the name. In this case the name is a - * {@link FileType#FOLDER} if it ends with an "/" else it will be a {@link FileType#FILE}. - * </p> - * <p> - * Once attached it will be changed to reflect the real type of this resource. - * </p> - * - * @return {@link FileType#FOLDER} or {@link FileType#FILE} - */ - FileType getType(); - - /** - * Returns a "friendly path", this is a path without a password. - * <p> - * This path can not be used to resolve the path again. - * </p> - * - * @return the friendly URI as a String. - */ - String getFriendlyURI(); }