All Manuals > LispWorks® User Guide and Reference Manual > 47 The SYSTEM Package

find-filename-pattern-encoding-match Function

Summary

Finds the encoding of a file based on the filename.

Package

system

Signature

find-filename-pattern-encoding-match pathname ef-spec buffer length => new-ef-spec

Arguments
pathname
Pathname identifying location of buffer.
ef-spec
An external format spec.
buffer
A buffer whose contents are examined.
length
Length (an integer) up to which buffer should be examined.
Values
new-ef-spec
An external format spec.
Description

The function find-filename-pattern-encoding-match compares pathname (using pathname-match-p) with elements of *filename-pattern-encoding-matches*.

If a match is found, merges ef-spec with the corresponding external format spec and returns the result as new-ef-spec. Thus it does not override a supplied ef-spec.

buffer and length are ignored.

See also

*file-encoding-detection-algorithm*
*filename-pattern-encoding-matches*


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:31:02