Class LocalFetcher

All Implemented Interfaces:
Configurable<LocalFetcherConfig>, EventListener<Event>, Fetcher, EventListener, Consumer<Event>

public class LocalFetcher extends AbstractNioFetcher<LocalFetcherConfig>

Fetcher for a local file system, backed by the JDK's default FileSystemProvider. Mounted file systems and mapped drives not requiring special configuration to access can also be considered "local". Paths starting with any of the following will be recognized as local file system:

  • file:///some/directory
  • file:///C:/some/directory
  • /some/directory
  • C:\some\directory
  • C:/some/directory

Access Control List (ACL)

When asked to (see LocalFetcherConfig.setAcl(AclFetchMode)), this fetcher writes who may read each file in the standard crawler.acl field:

  • Windows: the file's ACL, inherited entries included. An entry allowing or denying the read-data right is an allow or a deny.
  • Linux and macOS: the owner, group and mode bits and, with AclFetchMode.EXTENDED, the file's extended ACL (read from the operating system through JNA). A path level says who may go through every folder above the file, which reading it also needs. Users and groups are numbers (uid, gid) of the directory unix:<host>, with their names.

When extended ACLs cannot be read on the host, one warning is logged for the crawl and the files' ACLs are partial.

Archive files as file systems

Archive files (zip, tar, jar, etc.) are no longer handled by this fetcher. Use ArchiveFetcher instead, which supports both local and remote archives and provides credential configuration for inner remote file systems.