Class SameFileAliasChecker

All Implemented Interfaces:

@Deprecated public class SameFileAliasChecker extends Object implements ContextHandler.AliasCheck
Alias checking for working with FileSystems that normalize access to the File System.

The Java Files.isSameFile(Path, Path) method is used to determine if the requested file is the same as the alias file.

For File Systems that are case insensitive (eg: Microsoft Windows FAT32 and NTFS), the access to the file can be in any combination or style of upper and lowercase.

For File Systems that normalize UTF-8 access (eg: Mac OSX on HFS+ or APFS, or Linux on XFS) the the actual file could be stored using UTF-16, but be accessed using NFD UTF-8 or NFC UTF-8 for the same file.

  • Constructor Details

    • SameFileAliasChecker

      public SameFileAliasChecker()
  • Method Details

    • check

      public boolean check(String pathInContext, Resource resource)
      Description copied from interface: ContextHandler.AliasCheck
      Check an alias
      Specified by:
      check in interface ContextHandler.AliasCheck
      pathInContext - The path the aliased resource was created for
      resource - The aliased resourced
      True if the resource is OK to be served.