JavaScript do not have access to client file system, it is for security/safety reasons.
Access to client file system is a dream feature for any malware.
What is possible is
local storage, it is a protected storage space which does not expose client file system.
HTML Web Storage[
^]