The temporary-file Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The temporary-file Reference Manual

This is the temporary-file Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 09:25:03 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

PLEASE DO NOT USE THIS LIBRARY, IT HAS BEEN INCORPORATED INTO https://github.com/edicl/cl-fad

temporary-file

Common Lisp temporary file creation library


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 temporary-file

Author

Hans Hübner <hans.huebner@gmail.com>

License

BSD

Description

Temporary file creation library

Dependencies
Source

temporary-file.asd (file)

Component

temporary-file.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 temporary-file.asd

Location

temporary-file.asd

Systems

temporary-file (system)


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 temporary-file/temporary-file.lisp

Parent

temporary-file (system)

Location

temporary-file.lisp

Packages

temporary-file

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 temporary-file

Source

temporary-file.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *default-template*
Package

temporary-file

Source

temporary-file.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Macros

Macro: with-open-temporary-file (STREAM &rest ARGS &key KEEP &allow-other-keys) &body BODY

Create a temporary file using OPEN-TEMPORARY with ARGS and run BODY with STREAM bound to the temporary file stream. Returns the values returned by BODY. By default, the file is deleted when BODY is exited. If a true value is passed in KEEP, the file is not deleted when the body is exited. See OPEN-TEMPORARY for more permitted options.

Package

temporary-file

Source

temporary-file.lisp (file)

Macro: with-output-to-temporary-file (STREAM &rest ARGS) &body BODY

Create a temporary file using OPEN-TEMPORARY with ARGS and run BODY with STREAM bound to the temporary file stream. Returns the pathname of the file that has been created. See OPEN-TEMPORARY for permitted options.

Package

temporary-file

Source

temporary-file.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Functions

Function: open-temporary &rest OPEN-ARGUMENTS &key TEMPLATE GENERATE-RANDOM-STRING MAX-TRIES DIRECTION &allow-other-keys

Create a file with a randomly generated name and return the opened stream. The resulting pathname is generated from TEMPLATE, which is a string representing a pathname template. A percent sign (%) in that string is replaced by a randomly generated string to make the filename unique. The default for TEMPLATE places temporary files in the TEMPORARY-FILES logical pathname host, which is automatically set up in a system specific manner. The file name generated from TEMPLATE is merged with *DEFAULT-PATHNAME-DEFAULTS*, so random pathnames relative to that directory can be generated by not specifying a directory in TEMPLATE.

GENERATE-RANDOM-STRING can be passed to override the default function that generates the random name component. It should return a random string consisting of characters that are permitted in a pathname (logical or physical, depending on TEMPLATE).

The name of the temporary file can be accessed calling the PATHNAME function on STREAM. For convenience, the temporary file is opened on the physical pathname, i.e. if the TEMPLATE designate a logical pathname the translation to a physical pathname is performed before opening the stream.

In order to create a unique file name, OPEN-TEMPORARY may loop internally up to MAX-TRIES times before giving up and signalling a CANNOT-CREATE-TEMPORARY-FILE condition.

Package

temporary-file

Source

temporary-file.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Conditions

Condition: cannot-create-temporary-file ()
Package

temporary-file

Source

temporary-file.lisp (file)

Direct superclasses

error (condition)

Direct slots
Slot: template
Initargs

:template

Slot: max-tries
Initargs

:max-tries

Condition: invalid-temporary-pathname-template ()
Package

temporary-file

Source

temporary-file.lisp (file)

Direct superclasses

error (condition)

Direct slots
Slot: string
Initargs

:string


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *create-file-name-lock*
Package

temporary-file

Source

temporary-file.lisp (file)

Special Variable: *max-tries*
Package

temporary-file

Source

temporary-file.lisp (file)

Special Variable: *name-random-state*
Package

temporary-file

Source

temporary-file.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: with-file-name-lock-held () &body BODY
Package

temporary-file

Source

temporary-file.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: directory-from-environment ENVIRONMENT-VARIABLE-NAME
Package

temporary-file

Source

temporary-file.lisp (file)

Function: generate-random-pathname TEMPLATE RANDOM-STRING-GENERATOR
Package

temporary-file

Source

temporary-file.lisp (file)

Function: generate-random-string ()
Package

temporary-file

Source

temporary-file.lisp (file)

Function: get-default-temporary-directory ()
Package

temporary-file

Source

temporary-file.lisp (file)

Function: getenv X

Query the libc runtime environment. See getenv(3).

Package

temporary-file

Source

temporary-file.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   T  
Index Entry  Section

F
File, Lisp, temporary-file.asd: The temporary-file<dot>asd file
File, Lisp, temporary-file/temporary-file.lisp: The temporary-file/temporary-file<dot>lisp file

L
Lisp File, temporary-file.asd: The temporary-file<dot>asd file
Lisp File, temporary-file/temporary-file.lisp: The temporary-file/temporary-file<dot>lisp file

T
temporary-file.asd: The temporary-file<dot>asd file
temporary-file/temporary-file.lisp: The temporary-file/temporary-file<dot>lisp file

Jump to:   F   L   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   D   F   G   M   O   W  
Index Entry  Section

D
directory-from-environment: Internal functions

F
Function, directory-from-environment: Internal functions
Function, generate-random-pathname: Internal functions
Function, generate-random-string: Internal functions
Function, get-default-temporary-directory: Internal functions
Function, getenv: Internal functions
Function, open-temporary: Exported functions

G
generate-random-pathname: Internal functions
generate-random-string: Internal functions
get-default-temporary-directory: Internal functions
getenv: Internal functions

M
Macro, with-file-name-lock-held: Internal macros
Macro, with-open-temporary-file: Exported macros
Macro, with-output-to-temporary-file: Exported macros

O
open-temporary: Exported functions

W
with-file-name-lock-held: Internal macros
with-open-temporary-file: Exported macros
with-output-to-temporary-file: Exported macros

Jump to:   D   F   G   M   O   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
M   S   T  
Index Entry  Section

*
*create-file-name-lock*: Internal special variables
*default-template*: Exported special variables
*max-tries*: Internal special variables
*name-random-state*: Internal special variables

M
max-tries: Exported conditions

S
Slot, max-tries: Exported conditions
Slot, string: Exported conditions
Slot, template: Exported conditions
Special Variable, *create-file-name-lock*: Internal special variables
Special Variable, *default-template*: Exported special variables
Special Variable, *max-tries*: Internal special variables
Special Variable, *name-random-state*: Internal special variables
string: Exported conditions

T
template: Exported conditions

Jump to:   *  
M   S   T  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   I   P   S   T  
Index Entry  Section

C
cannot-create-temporary-file: Exported conditions
Condition, cannot-create-temporary-file: Exported conditions
Condition, invalid-temporary-pathname-template: Exported conditions

I
invalid-temporary-pathname-template: Exported conditions

P
Package, temporary-file: The temporary-file package

S
System, temporary-file: The temporary-file system

T
temporary-file: The temporary-file system
temporary-file: The temporary-file package

Jump to:   C   I   P   S   T