extension-related-path

Name

extension-related-path -- Compute the pathname of a "related" file

Type: function

Synopsis

extension-related-path( pathname extension, new-pathname);

Arguments

pathname

A pathname object (an instance of <file-name>).

extension

A string.

Return Values

new-pathname

An instance of <file-name>.

Description

This function computes and returns the pathname of a file that is "close" to the file denoted by the given pathname, differing (possibly) only in it's extension.

(define f (string->file "stuff/quux.c"))

(extension-related-path f "o") filename stuff/quux.o