You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add a test for explicitly setting the mode to 'a' when using fs.appendFile.
However it is not obvious to me why the user might have the option of choosing a flag other than 'a'. Is there any value in leaving it as an option? It seems to me that for this method, any selection would either cause it to behave as if it were opened using 'a', or else cause some kind of error.
Update: I ended up making two test cases for testing the default values ( #494 ). This revealed a bug in the the implementation of appendFile. I have submitted another PR ( #546 ) that fixes this (and tests against it).
The text was updated successfully, but these errors were encountered:
MuchtarSalimov
changed the title
add tests for fs.appendFile for valid file system flags
add test for fs.appendFile for valid file system flags
Sep 23, 2018
MuchtarSalimov
changed the title
add test for fs.appendFile for valid file system flags
add test for fs.appendFile for valid file system flag
Sep 23, 2018
When calling fs.appendFile(path, data[, options], callback), within the options object we may include a file system flag (defaults to 'a' so that the file is opened for appending).
I would like to:
However it is not obvious to me why the user might have the option of choosing a flag other than 'a'. Is there any value in leaving it as an option? It seems to me that for this method, any selection would either cause it to behave as if it were opened using 'a', or else cause some kind of error.
Update: I ended up making two test cases for testing the default values ( #494 ). This revealed a bug in the the implementation of appendFile. I have submitted another PR ( #546 ) that fixes this (and tests against it).
The text was updated successfully, but these errors were encountered: