org.basex.query.fs
Class FSUtils

java.lang.Object
  extended by org.basex.query.fs.FSUtils

public final class FSUtils
extends java.lang.Object

Preliminary collection of file system methods.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Method Summary
static byte[] getName(Data data, int pre)
          Returns the name of a file, hidden inside a context set.
static java.lang.String getPath(Data data, int pre)
          Returns the path of a file.
static int getSize(Data data, int pre)
          Returns the size of a file, hidden inside a context set.
static byte[] getSuffix(Data data, int pre)
          Returns the name of a file, hidden inside a context set.
static boolean isDir(Data data, int pre)
          Checks if the specified node is a file.
static boolean isFile(Data data, int pre)
          Checks if the specified node is a file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public static byte[] getName(Data data,
                             int pre)
Returns the name of a file, hidden inside a context set.

Parameters:
data - data reference
pre - pre value
Returns:
file name.

getPath

public static java.lang.String getPath(Data data,
                                       int pre)
Returns the path of a file.

Parameters:
data - data reference
pre - pre value
Returns:
file path.

getSize

public static int getSize(Data data,
                          int pre)
Returns the size of a file, hidden inside a context set.

Parameters:
data - data reference
pre - pre value
Returns:
string representation of the file name.

getSuffix

public static byte[] getSuffix(Data data,
                               int pre)
Returns the name of a file, hidden inside a context set.

Parameters:
data - data reference
pre - pre value
Returns:
file name.

isDir

public static boolean isDir(Data data,
                            int pre)
Checks if the specified node is a file.

Parameters:
data - data reference
pre - pre value
Returns:
result of comparison

isFile

public static boolean isFile(Data data,
                             int pre)
Checks if the specified node is a file.

Parameters:
data - data reference
pre - pre value
Returns:
result of comparison