Class Directory

java.lang.Object
org.apache.tomcat.jni.Directory

@Deprecated public class Directory extends Object
Deprecated.
The scope of the APR/Native Library will be reduced in Tomcat 10.1.x / Tomcat Native 2.x onwards to only include those components required to provide OpenSSL integration with the NIO and NIO2 connectors.
Directory
Author:
Mladen Turk
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    close(long thedir)
    Deprecated.
    close the specified directory.
    static int
    make(String path, int perm, long pool)
    Deprecated.
    Create a new directory on the file system.
    static int
    makeRecursive(String path, int perm, long pool)
    Deprecated.
    Creates a new directory on the file system, but behaves like 'mkdir -p'.
    static long
    open(String dirname, long pool)
    Deprecated.
    Open the specified directory.
    static int
    read(FileInfo finfo, int wanted, long thedir)
    Deprecated.
    Read the next entry from the specified directory.
    static int
    remove(String path, long pool)
    Deprecated.
    Remove directory from the file system.
    static int
    rewind(long thedir)
    Deprecated.
    Rewind the directory to the first entry.
    static String
    tempGet(long pool)
    Deprecated.
    Find an existing directory suitable as a temporary storage location.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Directory

      public Directory()
      Deprecated.
  • Method Details

    • make

      public static int make(String path, int perm, long pool)
      Deprecated.
      Create a new directory on the file system.
      Parameters:
      path - the path for the directory to be created. (use / on all systems)
      perm - Permissions for the new directory.
      pool - the pool to use.
      Returns:
      the operation result
    • makeRecursive

      public static int makeRecursive(String path, int perm, long pool)
      Deprecated.
      Creates a new directory on the file system, but behaves like 'mkdir -p'. Creates intermediate directories as required. No error will be reported if PATH already exists.
      Parameters:
      path - the path for the directory to be created. (use / on all systems)
      perm - Permissions for the new directory.
      pool - the pool to use.
      Returns:
      the operation result
    • remove

      public static int remove(String path, long pool)
      Deprecated.
      Remove directory from the file system.
      Parameters:
      path - the path for the directory to be removed. (use / on all systems)
      pool - the pool to use.
      Returns:
      the operation result
    • tempGet

      public static String tempGet(long pool)
      Deprecated.
      Find an existing directory suitable as a temporary storage location.
      Parameters:
      pool - The pool to use for any necessary allocations.
      Returns:
      The temp directory. This function uses an algorithm to search for a directory that an an application can use for temporary storage. Once such a directory is found, that location is cached by the library. Thus, callers only pay the cost of this algorithm once if that one time is successful.
    • open

      public static long open(String dirname, long pool) throws Error
      Deprecated.
      Open the specified directory.
      Parameters:
      dirname - The full path to the directory (use / on all systems)
      pool - The pool to use.
      Returns:
      The opened directory descriptor.
      Throws:
      Error - An error occurred
    • close

      public static int close(long thedir)
      Deprecated.
      close the specified directory.
      Parameters:
      thedir - the directory descriptor to close.
      Returns:
      the operation result
    • rewind

      public static int rewind(long thedir)
      Deprecated.
      Rewind the directory to the first entry.
      Parameters:
      thedir - the directory descriptor to rewind.
      Returns:
      the operation result
    • read

      public static int read(FileInfo finfo, int wanted, long thedir)
      Deprecated.
      Read the next entry from the specified directory.
      Parameters:
      finfo - the file info structure and filled in by apr_dir_read
      wanted - The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values
      thedir - the directory descriptor returned from apr_dir_open No ordering is guaranteed for the entries read.
      Returns:
      the operation result