Project

General

Profile

Actions

Feature #12496

open

Temporary directory and temporary file names

Added by Gavin Blakeman about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/07/2024
Due date:
% Done:

0%

Estimated time:

Description

Add the weak link attribute "attribute((weak))" to the functions createTempFileName() and getTempDir(). This will allow the functions to be replaced during link with application defined functions.
The use case is to provide a way to substitute a temporary file manager to manage the creation and segregation of temporary files.

  1. In a multi-tenant server each tenant could get a segregated temporary directory. This would prevent 'mixing' of temporary files between tenants.
  2. Allows application defined life/duration for temporary files.
  3. Allows application defined uniqueness criteria to be applied for temporary file names.
  4. Allows application defined ownership criteria to be applied to temporary files.

Note, some of the above can achieved by stealing the spool files. But it is not really desirable to have to start moving large files between directories. While this "should" be a cheap function call to just rewrite the path, in some prospective use cases it could result in a file copy. (Multi-tenant with tenants sitting on different physical disks)

Alternatives would be to create a mechanism to substitute the function calls at runtime. This would likely be more flexible, but more work to implement.

No data to display

Actions

Also available in: Atom PDF