-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Methods
- - - - - - - -dir(options, callbacknullable)
- - - - - - -Parameters:
- - -Name | - - -Type | - - -Attributes | - - - - -Description | -
---|---|---|---|
options |
-
-
- - - -Options -| - -dirCallback - - - - | - - -- - - - - - | - - - - -the options or the callback function | -
callback |
-
-
- - - -dirCallback - - - - | - - -
-
-
-
- <nullable> - - - - |
-
-
-
-
- - |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
dirSync(options) → {DirSyncObject}
- - - - - - -Parameters:
- - -Name | - - -Type | - - - - - -Description | -
---|---|---|
options |
-
-
- - - -Options - - - - | - - - - - -- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
Throws:
- - - --
-
-
- - if it cannot create a directory --
-
-
- -
- - Type - -
- - -Error - - - -
-
-
Returns:
- - --
-
- - Type - -
- - -DirSyncObject - - - -
file(options, callbacknullable)
- - - - - - -Parameters:
- - -Name | - - -Type | - - -Attributes | - - - - -Description | -
---|---|---|---|
options |
-
-
- - - -Options -| - -null -| - -undefined -| - -fileCallback - - - - | - - -- - - - - - | - - - - -the config options or the callback function or null or undefined | -
callback |
-
-
- - - -fileCallback - - - - | - - -
-
-
-
- <nullable> - - - - |
-
-
-
-
- - |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
fileSync(options) → {FileSyncObject}
- - - - - - -Parameters:
- - -Name | - - -Type | - - - - - -Description | -
---|---|---|
options |
-
-
- - - -Options - - - - | - - - - - -- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
Throws:
- - - --
-
-
- - if cannot create a file --
-
-
- -
- - Type - -
- - -Error - - - -
-
-
Returns:
- - --
-
- - Type - -
- - -FileSyncObject - - - -
setGracefulCleanup()
- - - - - - --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
tmpName(options, callbacknullable)
- - - - - - -Parameters:
- - -Name | - - -Type | - - -Attributes | - - - - -Description | -
---|---|---|---|
options |
-
-
- - - -Options -| - -tmpNameCallback - - - - | - - -- - - - - - | - - - - -options or callback | -
callback |
-
-
- - - -tmpNameCallback - - - - | - - -
-
-
-
- <nullable> - - - - |
-
-
-
-
- the callback function | -
tmpNameSync(options) → {string}
- - - - - - -Parameters:
- - -Name | - - -Type | - - - - - -Description | -
---|---|---|
options |
-
-
- - - -Object - - - - | - - - - - -- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
Throws:
- - - --
-
-
- - if the options are invalid or could not generate a filename --
-
-
- -
- - Type - -
- - -Error - - - -
-
-
Returns:
- - --
-
- - Type - -
- - -string - - - -
Type Definitions
- - - - - - - -cleanupCallback(nextopt)
- - - - - - -Parameters:
- - -Name | - - -Type | - - -Attributes | - - - - -Description | -
---|---|---|---|
next |
-
-
- - - -simpleCallback - - - - | - - -
-
- <optional> - - - - - - |
-
-
-
-
- function to call whenever the tmp object needs to be removed | -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
cleanupCallbackSync()
- - - - - - --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
dirCallback(errnullable, name, fn)
- - - - - - - - - - - - - - -Parameters:
- - -Name | - - -Type | - - -Attributes | - - - - -Description | -
---|---|---|---|
err |
-
-
- - - -Error - - - - | - - -
-
-
-
- <nullable> - - - - |
-
-
-
-
- the error object if anything goes wrong | -
name |
-
-
- - - -string - - - - | - - -- - - - - - | - - - - -the temporary file name | -
fn |
-
-
- - - -cleanupCallback - - - - | - - -- - - - - - | - - - - -the cleanup callback function | -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
dirCallbackSync(errnullable, name, fn)
- - - - - - - - - - - - - - -Parameters:
- - -Name | - - -Type | - - -Attributes | - - - - -Description | -
---|---|---|---|
err |
-
-
- - - -Error - - - - | - - -
-
-
-
- <nullable> - - - - |
-
-
-
-
- the error object if anything goes wrong | -
name |
-
-
- - - -string - - - - | - - -- - - - - - | - - - - -the temporary file name | -
fn |
-
-
- - - -cleanupCallbackSync - - - - | - - -- - - - - - | - - - - -the cleanup callback function | -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
DirSyncObject
- - - - - - -Type:
--
-
- - -Object - - - -
Properties:
- - - -Name | - - -Type | - - - - - -Description | -
---|---|---|
name |
-
-
- - - -string - - - - | - - - - - -the name of the directory | -
removeCallback |
-
-
- - - -fileCallback - - - - | - - - - - -the callback function to remove the directory | -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
fileCallback(errnullable, name, fd, fn)
- - - - - - - - - - - - - - -Parameters:
- - -Name | - - -Type | - - -Attributes | - - - - -Description | -
---|---|---|---|
err |
-
-
- - - -Error - - - - | - - -
-
-
-
- <nullable> - - - - |
-
-
-
-
- the error object if anything goes wrong | -
name |
-
-
- - - -string - - - - | - - -- - - - - - | - - - - -the temporary file name | -
fd |
-
-
- - - -number - - - - | - - -- - - - - - | - - - - -the file descriptor or -1 if the fd had been discarded | -
fn |
-
-
- - - -cleanupCallback - - - - | - - -- - - - - - | - - - - -the cleanup callback function | -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
fileCallbackSync(errnullable, name, fd, fn)
- - - - - - - - - - - - - - -Parameters:
- - -Name | - - -Type | - - -Attributes | - - - - -Description | -
---|---|---|---|
err |
-
-
- - - -Error - - - - | - - -
-
-
-
- <nullable> - - - - |
-
-
-
-
- the error object if anything goes wrong | -
name |
-
-
- - - -string - - - - | - - -- - - - - - | - - - - -the temporary file name | -
fd |
-
-
- - - -number - - - - | - - -- - - - - - | - - - - -the file descriptor or -1 if the fd had been discarded | -
fn |
-
-
- - - -cleanupCallbackSync - - - - | - - -- - - - - - | - - - - -the cleanup callback function | -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
FileSyncObject
- - - - - - -Type:
--
-
- - -Object - - - -
Properties:
- - - -Name | - - -Type | - - - - - -Description | -
---|---|---|
name |
-
-
- - - -string - - - - | - - - - - -the name of the file | -
fd |
-
-
- - - -string - - - - | - - - - - -the file descriptor or -1 if the fd has been discarded | -
removeCallback |
-
-
- - - -fileCallback - - - - | - - - - - -the callback function to remove the file | -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
Options
- - - - -Type:
--
-
- - -Object - - - -
Properties:
- - - -Name | - - -Type | - - -Attributes | - - - - -Description | -
---|---|---|---|
keep |
-
-
- - - -boolean - - - - | - - -
-
-
-
- <nullable> - - |
-
-
-
-
- the temporary object (file or dir) will not be garbage collected | -
tries |
-
-
- - - -number - - - - | - - -
-
-
-
- <nullable> - - |
-
-
-
-
- the number of tries before give up the name generation | -
(?int) |
-
-
- - - | - - -- - - - | - - - - -mode the access mode, defaults are 0o700 for directories and 0o600 for files | -
template |
-
-
- - - -string - - - - | - - -
-
-
-
- <nullable> - - |
-
-
-
-
- the "mkstemp" like filename template | -
name |
-
-
- - - -string - - - - | - - -
-
-
-
- <nullable> - - |
-
-
-
-
- fixed name relative to tmpdir or the specified dir option | -
dir |
-
-
- - - -string - - - - | - - -
-
-
-
- <nullable> - - |
-
-
-
-
- tmp directory relative to the root tmp directory in use | -
prefix |
-
-
- - - -string - - - - | - - -
-
-
-
- <nullable> - - |
-
-
-
-
- prefix for the generated name | -
postfix |
-
-
- - - -string - - - - | - - -
-
-
-
- <nullable> - - |
-
-
-
-
- postfix for the generated name | -
tmpdir |
-
-
- - - -string - - - - | - - -
-
-
-
- <nullable> - - |
-
-
-
-
- the root tmp directory which overrides the os tmpdir | -
unsafeCleanup |
-
-
- - - -boolean - - - - | - - -
-
-
-
- <nullable> - - |
-
-
-
-
- recursively removes the created temporary directory, even when it's not empty | -
detachDescriptor |
-
-
- - - -boolean - - - - | - - -
-
-
-
- <nullable> - - |
-
-
-
-
- detaches the file descriptor, caller is responsible for closing the file, tmp will no longer try closing the file during garbage collection | -
discardDescriptor |
-
-
- - - -boolean - - - - | - - -
-
-
-
- <nullable> - - |
-
-
-
-
- discards the file descriptor (closes file, fd is -1), tmp will no longer try closing the file during garbage collection | -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
simpleCallback()
- - - - - - --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - -
- See: -
- - - - - - -
tmpNameCallback(errnullable, name)
- - - - - - - - - - - - - - -Parameters:
- - -Name | - - -Type | - - -Attributes | - - - - -Description | -
---|---|---|---|
err |
-
-
- - - -Error - - - - | - - -
-
-
-
- <nullable> - - - - |
-
-
-
-
- the error object if anything goes wrong | -
name |
-
-
- - - -string - - - - | - - -- - - - - - | - - - - -the temporary file name | -