30 static private final String _slash =
"/";
31 static private final String _dot =
".";
33 private final String dirname_;
34 private final String basename_;
53 final String[] s2 = getString2DirItem(
path);
57 private static native String[] getString2DirItem(
final String s);
60 public String
dirname() {
return dirname_; }
69 if( _dot.equals( dirname_ ) ) {
72 if( _dot.equals( basename_ ) ) {
75 if( _slash.equals( dirname_ ) ) {
76 return dirname_ + basename_;
78 return dirname_ + _slash + basename_;
87 public boolean equals(
final Object other) {
91 return (other instanceof
DirItem) &&
92 this.dirname_.equals( ((
DirItem)other).dirname_ ) &&
93 this.basename_.equals( ((
DirItem)other).basename_ );
Representing a directory item split into dirname() and basename().
boolean equals(final Object other)
String basename()
Return the basename, shall not be empty nor contain a dirname.
String dirname()
Returns the dirname, shall not be empty and denotes .
DirItem(final String path)
Create a dir_item where path is split into dirname and basename after .
String path()
Returns a full unix path representation combining dirname() and basename().