Java Doc for FileName.java in  » Library » Apache-commons-vfs-20070724-src » org » apache » commons » vfs » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache commons vfs 20070724 src » org.apache.commons.vfs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.commons.vfs.FileName

All known Subclasses:   org.apache.commons.vfs.provider.AbstractFileName,
FileName
public interface FileName extends Comparable(Code)
Represents a file name. File names are immutable, and work correctly as keys in hash tables.
author:
   Adam Murdoch
version:
   $Revision: 480428 $ $Date: 2006-11-28 22:15:24 -0800 (Tue, 28 Nov 2006) $
See Also:   FileObject


Field Summary
final public  StringROOT_PATH
     The absolute path of the root of a file system.
final public  StringSEPARATOR
     The separator used in file paths.
final public  charSEPARATOR_CHAR
     The separator character used in file paths.


Method Summary
public  StringgetBaseName()
     Returns the base name of this file.
public  intgetDepth()
     Returns the depth of this file name, within its file system.
public  StringgetExtension()
     Returns the extension of this file name. The extension.
public  StringgetFriendlyURI()
    
public  FileNamegetParent()
     Returns the file name of the parent of this file.
public  StringgetPath()
     Returns the absolute path of this file, within its file system.
public  StringgetPathDecoded()
     Returns the absolute path of this file, within its file system.
public  StringgetRelativeName(FileName name)
     Converts a file name to a relative name, relative to this file name.
Parameters:
  name - The name to convert to a relative path.
public  FileNamegetRoot()
    
public  StringgetRootURI()
     Returns the root URI of the file system this file belongs to.
public  StringgetScheme()
     Returns the URI scheme of this file.
public  FileTypegetType()
     Returns the requested or current type of this name.
public  StringgetURI()
     Returns the absolute URI of this file.
public  booleanisAncestor(FileName ancestor)
     Determines if another file name is an ancestor of this file name.
public  booleanisDescendent(FileName descendent)
     Determines if another file name is a descendent of this file name.
public  booleanisDescendent(FileName descendent, NameScope nameScope)
     Determines if another file name is a descendent of this file name.

Field Detail
ROOT_PATH
final public String ROOT_PATH(Code)
The absolute path of the root of a file system.



SEPARATOR
final public String SEPARATOR(Code)
The separator used in file paths.



SEPARATOR_CHAR
final public char SEPARATOR_CHAR(Code)
The separator character used in file paths.





Method Detail
getBaseName
public String getBaseName()(Code)
Returns the base name of this file. The base name is the last element of the file name. For example the base name of /somefolder/somefile is somefile.

The root file of a file system has an empty base name. The base name. Never returns null.




getDepth
public int getDepth()(Code)
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.



getExtension
public String getExtension()(Code)
Returns the extension of this file name. The extension. Returns an empty string if the name has noextension.



getFriendlyURI
public String getFriendlyURI()(Code)
returns a "friendly path", this is a path without a password.
This path can not be used to resolve the path again



getParent
public FileName getParent()(Code)
Returns the file name of the parent of this file. The root of a file system has no parent. A FileName object representing the parent name. Returnsnull for the root of a file system.



getPath
public String getPath()(Code)
Returns the absolute path of this file, within its file system. This path is normalised, so that . and .. elements have been removed. Also, the path only contains / as its separator character. The path always starts with /

The root of a file system has / as its absolute path. The path. Never returns null.




getPathDecoded
public String getPathDecoded() throws FileSystemException(Code)
Returns the absolute path of this file, within its file system. This path is normalised, so that . and .. elements have been removed. Also, the path only contains / as its separator character. The path always starts with /

The root of a file system has / as its absolute path.

In contrast to FileName.getPath() the path is decoded i.e. all %nn stuff replaced by its character. The path. Never returns null.
throws:
  FileSystemException - if the path is not correctly encoded




getRelativeName
public String getRelativeName(FileName name) throws FileSystemException(Code)
Converts a file name to a relative name, relative to this file name.
Parameters:
  name - The name to convert to a relative path. The relative name.
throws:
  FileSystemException - On error.



getRoot
public FileName getRoot()(Code)
find the root of the filesystem



getRootURI
public String getRootURI()(Code)
Returns the root URI of the file system this file belongs to.



getScheme
public String getScheme()(Code)
Returns the URI scheme of this file.



getType
public FileType getType()(Code)
Returns the requested or current type of this name.

The "requested" type is the one determined during resolving the name.
In this case the name is a FileType.FOLDER if it ends with an "/" else it will be a FileType.FILE

Once attached it will be changed to reflect the real type of this resource.

FileType.FOLDER or FileType.FILE



getURI
public String getURI()(Code)
Returns the absolute URI of this file.



isAncestor
public boolean isAncestor(FileName ancestor)(Code)
Determines if another file name is an ancestor of this file name.



isDescendent
public boolean isDescendent(FileName descendent)(Code)
Determines if another file name is a descendent of this file name.



isDescendent
public boolean isDescendent(FileName descendent, NameScope nameScope)(Code)
Determines if another file name is a descendent of this file name.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.