On this page:
get-compilation-dir+  name
get-compilation-dir
get-compilation-bytecode-file

1.8 API for Bytecode Paths

 (require compiler/compilation-path) package: base

Added in version 6.0.1.10 of package base.

procedure

(get-compilation-dir+name path 
  [#:modes modes 
  #:roots roots 
  #:default-root default-root]) 
  
path? path?
  path : path-string?
  modes : (non-empty-listof (and/c path-string? relative-path?))
   = (use-compiled-file-paths)
  roots : (non-empty-listof (or/c path-string? 'same))
   = (current-compiled-file-roots)
  default-root : (or/c path-string? 'same) = (car roots)
Determines the directory that holds the bytecode form of path plus the base name of path.

The directory is determined by checking roots in order, and for each element of roots checking modes in order. The first such directory that contains a file whose name matches path with ".zo" added (in the sense of path-add-suffix) is reported as the return directory path. If no such file is found, the result corresponds to the first element of modes combined with default-roots.

Changed in version 7.1.0.9 of package base: Added the #:default-root argument.

procedure

(get-compilation-dir path    
  [#:modes modes    
  #:roots roots    
  #:default-root default-root])  path?
  path : path-string?
  modes : (non-empty-listof (and/c path-string? relative-path?))
   = (use-compiled-file-paths)
  roots : (non-empty-listof (or/c path-string? 'same))
   = (current-compiled-file-roots)
  default-root : (or/c path-string? 'same) = (car roots)
The same as get-compilation-dir+name, but returning only the first result.

Changed in version 7.1.0.9 of package base: Added the #:default-root argument.

procedure

(get-compilation-bytecode-file path 
  [#:modes modes 
  #:roots roots 
  #:default-root default-root]) 
  path?
  path : path-string?
  modes : (non-empty-listof (and/c path-string? relative-path?))
   = (use-compiled-file-paths)
  roots : (non-empty-listof (or/c path-string? 'same))
   = (current-compiled-file-roots)
  default-root : (or/c path-string? 'same) = (car roots)
The same as get-compilation-dir+name, but combines the results and adds a ".zo" suffix to arrive at a bytecode file path.

Changed in version 7.1.0.9 of package base: Added the #:default-root argument.