From 3d2fda7dd39e2363682f1fa353c951ab0d44ddfa Mon Sep 17 00:00:00 2001 From: Fulup Ar Foll Date: Tue, 9 Feb 2016 18:40:49 +0100 Subject: Implemented URL query parsing for initial token /opa/?token=abcde --- .../jszip/documentation/api_jszip/file_name.md | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 afb-client/bower_components/jszip/documentation/api_jszip/file_name.md (limited to 'afb-client/bower_components/jszip/documentation/api_jszip/file_name.md') diff --git a/afb-client/bower_components/jszip/documentation/api_jszip/file_name.md b/afb-client/bower_components/jszip/documentation/api_jszip/file_name.md new file mode 100644 index 0000000..88b6d43 --- /dev/null +++ b/afb-client/bower_components/jszip/documentation/api_jszip/file_name.md @@ -0,0 +1,46 @@ +--- +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. + + + +__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 +``` + + -- cgit 1.2.3-korg