On this page:
make-cache-busting-file-name
find-file-path
file-readable?

3 idiocket/file

procedure

(make-cache-busting-file-name variant [n])

  (or/c path-string? path-for-some-system?)
  variant : (or/c path-string? path-for-some-system? input-port?)
  n : (between/c 1 40) = 8
If variant is a path to a file, then this returns a file name of the format HASH.EXT. HASH is the first n characters of variant’s SHA-1 content hash. EXT is the same file extension used by variant.

If variant is an input port, then this will return a path string of format HASH using that port’s contents. This procedure will read all contents from that port.

procedure

(find-file-path p 
  [search-dirs 
  #:must-exist must-exist]) 
  (or/c #f complete-path?)
  p : pathy/c
  search-dirs : (non-empty-listof complete-path?)
   = (list (current-directory))
  must-exist : boolean? = #t
If p is complete, this returns p. Otherwise, this returns the first path built from each directory in search-dirs to refer to an existing file.

If no file is found, the result depends on must-exist. If must-exist is a true value, this will raise exn:fail:filesystem. Otherwise, the result is #f.

procedure

(file-readable? path)  boolean?

  path : pathy/c
Returns #t if a file exists at path and is readable.