Genese complexity report

<- promises.d.ts
Methods : 50
Complexity index : 48
Cyclomatic complexity : 50
Cognitive complexity
100 % Correct 50/50
0 % Warning 0/50 (threshold : 10)
0 % Error 0/50 (threshold : 20)
Cyclomatic complexity
100 % Correct 50/50
0 % Warning 0/50 (threshold : 5)
0 % Error 0/50 (threshold : 10)
Methods of promises.d.ts
access Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously tests a user's permissions for the file specified by path.
                 * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
                 * URL support is _experimental_.
                 */
                function access(path: PathLike, mode?: number): Promise<void>; // ---------------------------------------------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
copyFile Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists.
                 * Node.js makes no guarantees about the atomicity of the copy operation.
                 * If an error occurs after the destination file has been opened for writing, Node.js will attempt
                 * to remove the destination.
                 * @param src A path to the source file.
                 * @param dest A path to the destination file.
                 * @param flags An optional integer that specifies the behavior of the copy operation. The only
                 * supported flag is `fs.constants.COPYFILE_EXCL`, which causes the copy operation to fail if
                 * `dest` already exists.
                 */
                function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise<void>; // ------------------------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
open Complexity Index 1 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous open(2) - open and possibly create a file.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not
                 * supplied, defaults to `0o666`.
                 */
                function open(path: PathLike, flags: string | number, mode?: Mode): Promise<FileHandle>; // ---------- +1.0 Complexity index (+1.0 atomic)
            
                            
                        
read Complexity Index 1.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously reads data from the file referenced by the supplied `FileHandle`.
                 * @param handle A `FileHandle`.
                 * @param buffer The buffer that the data will be written to.
                 * @param offset The offset in the buffer at which to start writing.
                 * @param length The number of bytes to read.
                 * @param position The offset from the beginning of the file from which data should be read. If
                 * `null`, data will be read from the current position.
                 */
                function read<TBuffer extends Uint8Array>( // ------------------------------------------------------------ +0.3 Complexity index (+0.3 atomic)
                    handle: FileHandle, // ------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    buffer: TBuffer, // ---------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    offset?: number | null, // --------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    length?: number | null, // --------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    position?: number | null, // ------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                ): Promise<{ bytesRead: number, buffer: TBuffer }>; // --------------------------------------------------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
write Complexity Index 1.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously writes `buffer` to the file referenced by the supplied `FileHandle`.
                 * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise`
                 * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
                 * @param handle A `FileHandle`.
                 * @param buffer The buffer that the data will be written to.
                 * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
                 * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
                 * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
                 */
                function write<TBuffer extends Uint8Array>( // -------------------------------------------------------------------------------------------------------------- +0.3 Complexity index (+0.3 atomic)
                    handle: FileHandle, // ---------------------------------------------------------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    buffer: TBuffer, // ------------------------------------------------------------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    offset?: number | null, // ------------------------------------------------------------------------------------------------------------------------------ +0.2 Complexity index (+0.2 atomic)
                    length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; // ----------------------------------------------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
write Complexity Index 1.4 Cyclomatic complexity 1
                            
                                
                    
            
                /**
                 * Asynchronously writes `string` to the file referenced by the supplied `FileHandle`.
                 * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise`
                 * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
                 * @param handle A `FileHandle`.
                 * @param string A string to write.
                 * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
                 * @param encoding The expected string encoding.
                 */
                function write(handle: FileHandle, string: string, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>; // ------- +1.4 Complexity index (+1.4 atomic)
            
                            
                        
rename Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous rename(2) - Change the name or location of a file or directory.
                 * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * URL support is _experimental_.
                 * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * URL support is _experimental_.
                 */
                function rename(oldPath: PathLike, newPath: PathLike): Promise<void>; // ---------------------------------------------------------------------------------------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
truncate Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous truncate(2) - Truncate a file to a specified length.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param len If not specified, defaults to `0`.
                 */
                function truncate(path: PathLike, len?: number): Promise<void>; // -------------------------------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
ftruncate Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous ftruncate(2) - Truncate a file to a specified length.
                 * @param handle A `FileHandle`.
                 * @param len If not specified, defaults to `0`.
                 */
                function ftruncate(handle: FileHandle, len?: number): Promise<void>; // -------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
rmdir Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous rmdir(2) - delete a directory.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 */
                function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>; // ------------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
rm Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
                 */
                function rm(path: PathLike, options?: RmOptions): Promise<void>; // ------------------------------------ +0.7 Complexity index (+0.7 atomic)
            
                            
                        
fdatasync Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
                 * @param handle A `FileHandle`.
                 */
                function fdatasync(handle: FileHandle): Promise<void>; // --------------------------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
fsync Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
                 * @param handle A `FileHandle`.
                 */
                function fsync(handle: FileHandle): Promise<void>; // ------------------------------------------------------ +0.5 Complexity index (+0.5 atomic)
            
                            
                        
mkdir Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous mkdir(2) - create a directory.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
                 * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
                 */
                function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): Promise<string>; // ---------------------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
mkdir Complexity Index 1.1 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous mkdir(2) - create a directory.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
                 * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
                 */
                function mkdir(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): Promise<void>; // ------- +1.1 Complexity index (+1.1 atomic)
            
                            
                        
mkdir Complexity Index 1 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous mkdir(2) - create a directory.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
                 * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
                 */
                function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>; // -------------------- +1.0 Complexity index (+1.0 atomic)
            
                            
                        
readdir Complexity Index 1.2 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous readdir(3) - read a directory.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
                 */
                function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise<string[]>; // ------------- +1.2 Complexity index (+1.2 atomic)
            
                            
                        
readdir Complexity Index 1.3 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous readdir(3) - read a directory.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
                 */
                function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Promise<Buffer[]>; // ----------------------------- +1.3 Complexity index (+1.3 atomic)
            
                            
                        
readdir Complexity Index 1.5 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous readdir(3) - read a directory.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
                 */
                function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise<string[] | Buffer[]>; // ------- +1.5 Complexity index (+1.5 atomic)
            
                            
                        
readdir Complexity Index 1 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous readdir(3) - read a directory.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
                 */
                function readdir(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Promise<Dirent[]>; // --------------------------------------------- +1.0 Complexity index (+1.0 atomic)
            
                            
                        
fstat Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous fstat(2) - Get file status.
                 * @param handle A `FileHandle`.
                 */
                function fstat(handle: FileHandle): Promise<Stats>; // -------------------------------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
lstat Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 */
                function lstat(path: PathLike): Promise<Stats>; // ------------------------------------------------ +0.5 Complexity index (+0.5 atomic)
            
                            
                        
stat Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous stat(2) - Get file status.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 */
                function stat(path: PathLike): Promise<Stats>; // ------------------------------------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
fchmod Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous fchmod(2) - Change permissions of a file.
                 * @param handle A `FileHandle`.
                 * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
                 */
                function fchmod(handle: FileHandle, mode: Mode): Promise<void>; // ---------------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
chmod Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous chmod(2) - Change permissions of a file.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
                 */
                function chmod(path: PathLike, mode: Mode): Promise<void>; // ------------------------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
lchmod Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
                 */
                function lchmod(path: PathLike, mode: Mode): Promise<void>; // ------------------------------------------ +0.7 Complexity index (+0.7 atomic)
            
                            
                        
lchown Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 */
                function lchown(path: PathLike, uid: number, gid: number): Promise<void>; // -------------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
lutimes Complexity Index 1.3 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
                 * with the difference that if the path refers to a symbolic link, then the link is not
                 * dereferenced: instead, the timestamps of the symbolic link itself are changed.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param atime The last access time. If a string is provided, it will be coerced to number.
                 * @param mtime The last modified time. If a string is provided, it will be coerced to number.
                 */
                function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>; // ------- +1.3 Complexity index (+1.3 atomic)
            
                            
                        
fchown Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous fchown(2) - Change ownership of a file.
                 * @param handle A `FileHandle`.
                 */
                function fchown(handle: FileHandle, uid: number, gid: number): Promise<void>; // ---------------------------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
chown Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous chown(2) - Change ownership of a file.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 */
                function chown(path: PathLike, uid: number, gid: number): Promise<void>; // ----------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
utimes Complexity Index 1.3 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously change file timestamps of the file referenced by the supplied path.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param atime The last access time. If a string is provided, it will be coerced to number.
                 * @param mtime The last modified time. If a string is provided, it will be coerced to number.
                 */
                function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>; // ------- +1.3 Complexity index (+1.3 atomic)
            
                            
                        
futimes Complexity Index 1.3 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously change file timestamps of the file referenced by the supplied `FileHandle`.
                 * @param handle A `FileHandle`.
                 * @param atime The last access time. If a string is provided, it will be coerced to number.
                 * @param mtime The last modified time. If a string is provided, it will be coerced to number.
                 */
                function futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise<void>; // ------- +1.3 Complexity index (+1.3 atomic)
            
                            
                        
realpath Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous realpath(3) - return the canonicalized absolute pathname.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
                 */
                function realpath(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>; // ------------------------------------------ +0.9 Complexity index (+0.9 atomic)
            
                            
                        
realpath Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous realpath(3) - return the canonicalized absolute pathname.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
                 */
                function realpath(path: PathLike, options: BufferEncodingOption): Promise<Buffer>; // ------------------------------------------------------------------ +0.7 Complexity index (+0.7 atomic)
            
                            
                        
realpath Complexity Index 1.1 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronous realpath(3) - return the canonicalized absolute pathname.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
                 */
                function realpath(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string | Buffer>; // --------------------------------- +1.1 Complexity index (+1.1 atomic)
            
                            
                        
mkdtemp Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously creates a unique temporary directory.
                 * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
                 * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
                 */
                function mkdtemp(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>; // ------------------------------------------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
mkdtemp Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously creates a unique temporary directory.
                 * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
                 * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
                 */
                function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<Buffer>; // ------------------------------------------------------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
mkdtemp Complexity Index 1.1 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously creates a unique temporary directory.
                 * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
                 * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
                 */
                function mkdtemp(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string | Buffer>; // ---------------------------------- +1.1 Complexity index (+1.1 atomic)
            
                            
                        
writeFile Complexity Index 1.9 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously writes data to a file, replacing the file if it already exists.
                 * It is unsafe to call `fsPromises.writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected).
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * URL support is _experimental_.
                 * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
                 * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
                 * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
                 * If `encoding` is not supplied, the default of `'utf8'` is used.
                 * If `mode` is not supplied, the default of `0o666` is used.
                 * If `mode` is a string, it is parsed as an octal integer.
                 * If `flag` is not supplied, the default of `'w'` is used.
                 */
                function writeFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>; // ------- +1.9 Complexity index (+1.9 atomic)
            
                            
                        
appendFile Complexity Index 1.9 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously append data to a file, creating the file if it does not exist.
                 * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * URL support is _experimental_.
                 * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
                 * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
                 * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
                 * If `encoding` is not supplied, the default of `'utf8'` is used.
                 * If `mode` is not supplied, the default of `0o666` is used.
                 * If `mode` is a string, it is parsed as an octal integer.
                 * If `flag` is not supplied, the default of `'a'` is used.
                 */
                function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>; // ------- +1.9 Complexity index (+1.9 atomic)
            
                            
                        
readFile Complexity Index 1.2 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously reads the entire contents of a file.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
                 * @param options An object that may contain an optional flag.
                 * If a flag is not provided, it defaults to `'r'`.
                 */
                function readFile(path: PathLike | FileHandle, options?: { encoding?: null, flag?: OpenMode } | null): Promise<Buffer>; // --------------------------------------------------------------------- +1.2 Complexity index (+1.2 atomic)
            
                            
                        
readFile Complexity Index 1.4 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously reads the entire contents of a file.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
                 * @param options An object that may contain an optional flag.
                 * If a flag is not provided, it defaults to `'r'`.
                 */
                function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: OpenMode } | BufferEncoding): Promise<string>; // ------- +1.4 Complexity index (+1.4 atomic)
            
                            
                        
readFile Complexity Index 1.5 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Asynchronously reads the entire contents of a file.
                 * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
                 * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
                 * @param options An object that may contain an optional flag.
                 * If a flag is not provided, it defaults to `'r'`.
                 */
                function readFile(path: PathLike | FileHandle, options?: BaseEncodingOptions & { flag?: OpenMode } | BufferEncoding | null): Promise<string | Buffer>; // ------- +1.5 Complexity index (+1.5 atomic)
            
                            
                        
opendir Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                function opendir(path: string, options?: OpenDirOptions): Promise<Dir>; // -------------------------------------------------------------------------------------- +0.7 Complexity index (+0.7 atomic)