createExclusiveFile {xega} | R Documentation |
Create a unique filename.
Description
Name conflicts in filenames are avoided by
Including the time fractions below a second (
tfrac
).Padding the name with 6 random letters.
Locking and retrying (as a last resort). The program stops after 10 unsuccessful attempts of finding a unique name.
Created by Jens Kleineheismann (2025).
Usage
createExclusiveFile(fpath = ".", prefix = "data", ext = ".dat")
Arguments
fpath |
File path. Default: ".". |
prefix |
The filename. Default: "data". |
ext |
The file extension. Default: ".dat". |
Value
A filename. Components: [prefix]_[year][month][day]_[h][min][sec]_[node]_[pid]_[pad]_[fracsec].[ext]
Examples
tmp<-tempdir()
fn<-createExclusiveFile(fpath=tmp, prefix="data", ext=".dat")
cat(fn)
[Package xega version 0.9.0.8 Index]