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 an almost empty vessel File abstraction so that the open method does return an object, albeit not functional as part of this iteration.
implement the File.stat method to retrieve file information about the file itself
implement the FileInfo abstraction to fulfill 👆
Details
In this implementation step, we should declare and implement the open function, as showcased in the dedicated design document. This function inputs a path string and returns a Promises resolving to a File instance. To give some minimal usefulness to the abstraction, we expect to have the File.stat method and its FileInfo construct counterparts exposed alongside it.
We expect the open function to perform all the underlying operations it should, regardless of whether we expose helpful methods on the resulting File object yet:
resolve, clean, and secure the path to the resource
ensure it exists and is accessible
open it
map the file descriptor and track it internally in the module, as described in the design doc, and in a fashion that allows us to fulfill the scope of the stat method.
oleiade
changed the title
Implement the File API's open method and base File abstraction.
Implement the File API's open method, base File abstraction and File.stat operation.
Jun 27, 2023
As part of #3141, implementing the agreed-upon design for k6's File API, we intend to:
open
function to it, as specifiedFile
abstraction so that theopen
method does return an object, albeit not functional as part of this iteration.File.stat
method to retrieve file information about the file itselfFileInfo
abstraction to fulfill 👆Details
In this implementation step, we should declare and implement the
open
function, as showcased in the dedicated design document. This function inputs apath
string and returns a Promises resolving to aFile
instance. To give some minimal usefulness to the abstraction, we expect to have theFile.stat
method and itsFileInfo
construct counterparts exposed alongside it.We expect the
open
function to perform all the underlying operations it should, regardless of whether we expose helpful methods on the resultingFile
object yet:stat
method.The result would look something like this
The text was updated successfully, but these errors were encountered: