Implement a function in the FileSystemService to update user data in an existing file using the FileSystem module.
Context
Updating user data files is required when performing user data updates.
Acceptance Criteria
A function named updateFile is defined in the FileSystemService module.
The function accepts a user ID and updated user data as parameters.
*The function reads the existing JSON file (based on the user ID) using fs.readFile.
The function updates the necessary fields with the provided data.
The function writes the updated data back to the JSON file using fs.writeFile.
What it is
Implement a function in the
FileSystemService
to update user data in an existing file using the FileSystem module.Context
Updating user data files is required when performing user data updates.
Acceptance Criteria
updateFile
is defined in theFileSystemService
module.fs.readFile
.fs.writeFile
.