Class Os

java.lang.Object
org.apache.commons.vfs2.util.Os

@Deprecated public final class Os extends Object
Deprecated.
Use Apache Commons Lang's SystemUtils. Remove in 3.0.
Class to help determining the OS.
  • Field Details

    • OS_FAMILY_WINDOWS

      public static final OsFamily OS_FAMILY_WINDOWS
      Deprecated.
      All Windows based OSes.
    • OS_FAMILY_DOS

      public static final OsFamily OS_FAMILY_DOS
      Deprecated.
      All DOS based OSes.
    • OS_FAMILY_WINNT

      public static final OsFamily OS_FAMILY_WINNT
      Deprecated.
      All Windows NT based OSes.
    • OS_FAMILY_WIN9X

      public static final OsFamily OS_FAMILY_WIN9X
      Deprecated.
      All Windows 9x based OSes.
    • OS_FAMILY_OS2

      public static final OsFamily OS_FAMILY_OS2
      Deprecated.
      OS/2.
    • OS_FAMILY_NETWARE

      public static final OsFamily OS_FAMILY_NETWARE
      Deprecated.
      Netware.
    • OS_FAMILY_UNIX

      public static final OsFamily OS_FAMILY_UNIX
      Deprecated.
      All UNIX based OSes.
    • OS_FAMILY_MAC

      public static final OsFamily OS_FAMILY_MAC
      Deprecated.
      All Mac based OSes.
    • OS_FAMILY_OSX

      public static final OsFamily OS_FAMILY_OSX
      Deprecated.
      OSX.
    • OS_NAME

      private static final String OS_NAME
      Deprecated.
    • OS_ARCH

      private static final String OS_ARCH
      Deprecated.
    • OS_VERSION

      private static final String OS_VERSION
      Deprecated.
    • PATH_SEP

      private static final String PATH_SEP
      Deprecated.
    • OS_FAMILY

      private static final OsFamily OS_FAMILY
      Deprecated.
    • OS_ALL_FAMILIES

      private static final OsFamily[] OS_ALL_FAMILIES
      Deprecated.
    • ALL_FAMILIES

      private static final OsFamily[] ALL_FAMILIES
      Deprecated.
  • Constructor Details

    • Os

      private Os()
      Deprecated.
      Private constructor to block instantiation.
  • Method Details

    • isVersion

      public static boolean isVersion(String version)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS version.
      Parameters:
      version - The version to check.
      Returns:
      true if the version matches.
    • isArch

      public static boolean isArch(String arch)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS architecture.
      Parameters:
      arch - The architecture to check.
      Returns:
      true if the architecture mataches.
    • isFamily

      public static boolean isFamily(String family)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS family.
      Parameters:
      family - The family to check.
      Returns:
      true if the family matches.
    • isFamily

      public static boolean isFamily(OsFamily family)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS family.
      Parameters:
      family - The family to check.
      Returns:
      true if the family matches.
    • isName

      public static boolean isName(String name)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS name.
      Parameters:
      name - Description of Parameter
      Returns:
      The Name value
      Since:
      1.7
    • isOs

      public static boolean isOs(String family, String name, String arch, String version)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS family, name, architecture and version.
      Parameters:
      family - The OS family
      name - The OS name
      arch - The OS architecture
      version - The OS version
      Returns:
      The Os value
    • isOs

      public static boolean isOs(OsFamily family, String name, String arch, String version)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS family, name, architecture and version.
      Parameters:
      family - The OS family
      name - The OS name
      arch - The OS architecture
      version - The OS version
      Returns:
      The Os value
    • getFamily

      public static OsFamily getFamily(String name)
      Deprecated.
      Locates an OsFamily by name (case-insensitive).
      Parameters:
      name - The family name to lookup.
      Returns:
      the OS family, or null if not found.
    • versionMatches

      private static boolean versionMatches(String version)
      Deprecated.
    • archMatches

      private static boolean archMatches(String arch)
      Deprecated.
    • nameMatches

      private static boolean nameMatches(String name)
      Deprecated.
    • familyMatches

      private static boolean familyMatches(OsFamily family)
      Deprecated.
    • determineAllFamilies

      private static OsFamily[] determineAllFamilies()
      Deprecated.
    • determineOsFamily

      private static OsFamily determineOsFamily()
      Deprecated.