createTempDir function
- @Deprecated('Avoid creating temporary directories in the default temp location ' 'with this function due to too wide permissions on the newly created directory. ' 'Use kotlin.io.path.createTempDirectory instead.')
Creates an empty directory in the specified directory,
using the given prefix and suffix to generate its name.
Implementation
@Deprecated(
'Avoid creating temporary directories in the default temp location '
'with this function due to too wide permissions on the newly created directory. '
'Use kotlin.io.path.createTempDirectory instead.',
)
Directory createTempDir({
String prefix = 'tmp',
String? suffix,
File? directory,
}) {
return Directory.systemTemp.createTempSync(
'${directory?.path ?? ''}/$prefix${suffix ?? ''}',
);
}