Changes for File Service JS Consistency with Java

Defect: 83870: Add Sample Snippets and Test Cases for new APIs 
https://csnext.ibm.com/ccm6/web/projects/SBTK#action=com.ibm.team.workitem.viewWorkItem&itemId=_4V5L0CVYEeO0pvrbzwXNaA
created to add sample snippets and test cases