%PDF-1.7 GIF89;
Server IP : 5.161.254.237 / Your IP : 216.73.216.134 Web Server : Apache System : Linux diamond.sialwebvps.com 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64 User : stellasp ( 1131) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/stellasp/public_html/backend/vendors/jszip/documentation/api_jszip/ |
Upload File : |
--- title: "file(name)" layout: default section: api --- __Description__ : Get a file with the specified name. You can specify folders in the name : the folder separator is a forward slash ("/"). __Arguments__ name | type | description -----|--------|------------- name | string | the name of the file. __Returns__ : An instance of [ZipObject]({{site.baseurl}}/documentation/api_zipobject.html) representing the file if any, `null` otherwise. __Throws__ : Nothing. <!-- __Complexity__ : This is a simple lookup in **O(1)**. --> __Examples__ ```js var zip = new JSZip(); zip.file("file.txt", "content"); zip.file("file.txt").name // "file.txt" zip.file("file.txt").asText() // "content" zip.file("file.txt").options.dir // false // utf8 example var zip = new JSZip(zipFromAjaxWithUTF8); zip.file("amount.txt").asText() // "€15" zip.file("amount.txt").asArrayBuffer() // an ArrayBuffer containing €15 encoded as utf8 zip.file("amount.txt").asUint8Array() // an Uint8Array containing €15 encoded as utf8 // with folders zip.folder("sub").file("file.txt", "content"); zip.file("sub/file.txt"); // the file // or zip.folder("sub").file("file.txt") // the file ```