Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 54E24107FA for ; Fri, 30 Aug 2013 17:26:11 +0000 (UTC) Received: (qmail 33330 invoked by uid 500); 30 Aug 2013 17:25:59 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 32978 invoked by uid 500); 30 Aug 2013 17:25:53 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 32568 invoked by uid 99); 30 Aug 2013 17:25:52 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Aug 2013 17:25:52 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C500389ED2D; Fri, 30 Aug 2013 17:25:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: mwbrooks@apache.org To: commits@cordova.apache.org Date: Fri, 30 Aug 2013 17:26:10 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [20/36] Add edge for Spanish, French, and Chinese. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/file.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/file.md b/docs/fr/edge/cordova/file/file.md new file mode 100644 index 0000000..d2ce511 --- /dev/null +++ b/docs/fr/edge/cordova/file/file.md @@ -0,0 +1,72 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# Fichier + +> Une API pour lire, écrire et naviguer dans les hiérarchies de système de fichiers, basés sur l' [API de fichier W3C][1]. + + [1]: http://www.w3.org/TR/FileAPI + +## Objets + +* DirectoryEntry +* DirectoryReader +* Fichier +* FileEntry +* FileError +* FileReader +* Système de fichiers +* Transfert de fichiers +* FileTransferError +* FileUploadOptions +* FileUploadResult +* FileWriter +* Drapeaux +* Local +* Métadonnées + +## Accéder à la fonctionnalité + +Depuis la version 3.0, Cordova implémente API au niveau du périphérique comme les *plugins*. Utiliser de la CLI `plugin` commande, décrite dans l'Interface de ligne de commande, d'ajouter ou de supprimer cette fonction pour un projet : + + $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git + $ cordova plugin rm org.apache.cordova.core.file + + +Pour utiliser le plugin de transfert de fichiers vous devez ajouter séparément. + + $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git + $ cordova plugin rm org.apache.cordova.core.file-transfer + + +Ces commandes s'appliquent à toutes les plates-formes ciblées, mais modifier les paramètres de configuration spécifiques à la plateforme décrites ci-dessous : + +* Android + + (in app/res/XML/config.Xml) < nom de la fonction = "File" >< param name = "android-package" value="org.apache.cordova.FileUtils" / >< / fiction >< nom de la fonction = "Transfert de fichiers" >< param name = "android-package" value="org.apache.cordova.FileTransfer" / >< / fiction > (dans app/AndroidManifest.xml) < permissions des utilisations android:name="android.permission.WRITE_EXTERNAL_STORAGE" / > + + +* BlackBerry WebWorks + + (in www/plugins.Xml) < nom de la fonction = "Fichier" >< param name = "blackberry-package" value="org.apache.cordova.file.FileManager" / >< / fiction >< nom de la fonction = "Transfert de fichiers" >< param name = "blackberry-package" value="org.apache.cordova.http.FileTransfer" / >< / fiction > (dans www/config.xml) < disposent d'id="blackberry.io.file" requis = "true" version = "1.0.0.0" / >< disposent d'id="blackberry.utils" requis = "true" version = "1.0.0.0" / >< disposent d'id="blackberry.io.dir" requis = "true" version = "1.0.0.0" / >< jante: autorisations >< jante : permis > access_shared < / jante : permis >< / jante : autorisations > + + +* iOS (en`config.xml`) + + < nom de la fonction = « File » >< param nom = valeur « ios-package » = « CDVFile » / >< / fiction >< nom de la fonction = « Transfert de fichiers » >< param nom = valeur « ios-package » = « CDVFileTransfer » / >< / fiction > + + +Certaines plates-formes peuvent prendre en charge cette fonctionnalité sans nécessiter aucune configuration spéciale. Voir plate-forme prise en charge pour une vue d'ensemble. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/fileentry/fileentry.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/fileentry/fileentry.md b/docs/fr/edge/cordova/file/fileentry/fileentry.md new file mode 100644 index 0000000..92e40c0 --- /dev/null +++ b/docs/fr/edge/cordova/file/fileentry/fileentry.md @@ -0,0 +1,332 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# FileEntry + +Représente un fichier sur un système de fichiers, tel que défini dans la spécification [W3C répertoires et systèmes][1] . + + [1]: http://www.w3.org/TR/file-system-api/ + +## Propriétés + +* **isFile**: toujours `true` . *(booléen)* + +* **isDirectory**: toujours `false` . *(booléen)* + +* **nom**: le nom de la `FileEntry` , à l'exclusion de la voie menant à celle-ci. *(DOMString)* + +* **fullPath**: le chemin d'accès complet absolu de la racine à la `FileEntry` . *(DOMString)* + +**Remarque :** L'attribut suivant est défini par la spécification W3C, mais n'est *pas* supportée : + +* **système de fichiers**: le système de fichiers sur lequel le `FileEntry` réside. *(Système de fichiers)* + +## Méthodes + +* **getMetadata**: Rechercher des métadonnées relatives à un fichier. + +* **setMetadata**: définir des métadonnées sur un fichier. + +* **moveTo**: déplacer un fichier vers un autre emplacement sur le système de fichiers. + +* **copyTo**: copier un fichier vers un autre emplacement sur le système de fichiers. + +* **toURL**: retourner une URL qui peut être utilisée pour localiser un fichier. + +* **supprimer**: effacer un fichier. + +* **getParent**: chercher le répertoire parent. + +* **createWriter**: crée un `FileWriter` objet qui peut être utilisé pour écrire dans un fichier. + +* **fichier**: crée un `File` objet contenant les propriétés de fichier. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Windows Phone 7 et 8 +* Windows 8 + +## getMetadata + +Rechercher des métadonnées relatives à un fichier. + +**Paramètres :** + +* **successCallback**: un rappel passé un `Metadata` objet. *(Fonction)* + +* **errorCallback**: un rappel qui s'exécute si une erreur se produit lors de la récupération du `Metadata` . Appelée avec un `FileError` objet. *(Fonction)* + +**Petit exemple** + + function success(metadata) {console.log ("date de modification:" + metadata.modificationTime);} + + function fail(error) {alert(error.code);} + + / / Demande l'objet de métadonnées pour cette entrée entry.getMetadata (succès, échec) ; + + +## setMetadata + +Ensemble de métadonnées sur un fichier. + +**Actuellement ne fonctionne que sur iOS.** + +* celle-ci définira les attributs étendus d'un fichier. + +**Paramètres :** + +* **successCallback**: un rappel qui s'exécute lorsque les métadonnées sont définie. *(Fonction)* + +* **errorCallback**: un rappel qui s'exécute lorsque les métadonnées ne sont pas correctement définie. *(Fonction)* + +* **metadataObject**: un objet qui contient les clés et les valeurs de métadonnées. *(Objet)* + +**Petit exemple** + + function success() { + console.log("The metadata was successfully set."); + } + + function fail() { + alert("There was an error in setting the metadata"); + } + + // Set the metadata + entry.setMetadata(success, fail, { "com.apple.MobileBackup": 1}); + + +**iOS Quirk** + +* Seulement le `com.apple.MobileBackup` attribut étendu est pris en charge. Affectez la valeur `1` pour empêcher le fichier en cours de sauvegarde d'iCloud. Affectez la valeur `` pour ré-activer le fichier à sauvegarder vers iCloud. + +**Petit exemple** + + function setFileMetadata(localFileSystem, filePath, metadataKey, metadataValue) + { + var onSetMetadataWin = function() { + console.log("success setting metadata") + } + var onSetMetadataFail = function() { + console.log("error setting metadata") + } + + var onGetFileWin = function(parent) { + var data = {}; + data[metadataKey] = metadataValue; + parent.setMetadata(onSetMetadataWin, onSetMetadataFail, data); + } + var onGetFileFail = function() { + console.log("error getting file") + } + + var onFSWin = function(fileSystem) { + fileSystem.root.getFile(filePath, {create: true, exclusive: false}, onGetFileWin, onGetFileFail); + } + + var onFSFail = function(evt) { + console.log(evt.target.error.code); + } + + window.requestFileSystem(localFileSystem, 0, onFSWin, onFSFail); + } + + setFileMetadata(LocalFileSystem.PERSISTENT, "Backups/sqlite.db", "com.apple.MobileBackup", 1); + + +## moveTo + +Déplacer un fichier vers un autre emplacement sur le système de fichiers. Une erreur se produit si l'application tente de : + +* déplacer un fichier dans sa société mère, si un nom différent de son actuel n'est pas fourni ; + +* déplacer un fichier vers un chemin occupé par un répertoire ; + +En outre, déplacer un fichier sur un fichier existant tente de supprimer et de remplacer ce fichier. + +**Paramètres :** + +* **parent**: le répertoire parent vers laquelle déplacer le fichier. *(DirectoryEntry)* + +* **newName**: le nouveau nom du fichier. Par défaut, le nom actuel si non spécifié. *(DOMString)* + +* **successCallback**: un rappel passé le nouveau fichier `FileEntry` objet. *(Fonction)* + +* **errorCallback**: un rappel qui s'exécute si une erreur se produit lorsque vous tentez de déplacer le fichier. Appelée avec un `FileError` objet. *(Fonction)* + +**Petit exemple** + + function success(entry) { + console.log("New Path: " + entry.fullPath); + } + + function fail(error) { + alert(error.code); + } + + function moveFile(entry) { + var parent = document.getElementById('parent').value, + parentName = parent.substring(parent.lastIndexOf('/')+1), + parentEntry = new DirectoryEntry(parentName, parent); + + // move the file to a new directory and rename it + entry.moveTo(parentEntry, "newFile.txt", success, fail); + } + + +## copyTo + +Copier un fichier vers un nouvel emplacement sur le système de fichiers. Une erreur se produit si l'application tente de : + +* copier un fichier dans sa société mère, si un nom différent de son actuel n'est pas fourni. + +**Paramètres :** + +* **parent**: le répertoire parent dans lequel copier le fichier. *(DirectoryEntry)* + +* **newName**: le nouveau nom du fichier. Par défaut, le nom actuel si non spécifié. *(DOMString)* + +* **successCallback**: un rappel passé le nouveau fichier `FileEntry` objet. *(Fonction)* + +* **errorCallback**: un rappel qui s'exécute si une erreur se produit lorsque vous tentez de copier le fichier. Appelée avec un `FileError` objet. *(Fonction)* + +**Petit exemple** + + function win(entry) { + console.log("New Path: " + entry.fullPath); + } + + function fail(error) { + alert(error.code); + } + + function copyFile(entry) { + var parent = document.getElementById('parent').value, + parentName = parent.substring(parent.lastIndexOf('/')+1), + parentEntry = new DirectoryEntry(parentName, parent); + + // copy the file to a new directory and rename it + entry.copyTo(parentEntry, "file.copy", success, fail); + } + + +## toURL + +Retourne une URL qui peut être utilisée pour localiser le fichier. + +**Petit exemple** + + // Request the URL for this entry + var fileURL = entry.toURL(); + console.log(fileURL); + + +## supprimer + +Supprime un fichier. + +**Paramètres :** + +* **successCallback**: une fonction de rappel qui s'exécute après que le fichier a été supprimé. Appelé sans paramètre. *(Fonction)* + +* **errorCallback**: un rappel qui s'exécute si une erreur se produit lorsque vous tentez de supprimer le fichier. Appelée avec un `FileError` objet. *(Fonction)* + +**Petit exemple** + + function success(entry) { + console.log("Removal succeeded"); + } + + function fail(error) { + alert('Error removing file: ' + error.code); + } + + // remove the file + entry.remove(success, fail); + + +## getParent + +Rechercher le parent `DirectoryEntry` qui contient le fichier. + +**Paramètres :** + +* **successCallback**: un rappel passé parent du fichier `DirectoryEntry` . *(Fonction)* + +* **errorCallback**: un rappel qui s'exécute si une erreur se produit lorsque vous tentez de récupérer le parent `DirectoryEntry` . Appelée avec un `FileError` objet. *(Fonction)* + +**Petit exemple** + + function success(parent) { + console.log("Parent Name: " + parent.name); + } + + function fail(error) { + alert(error.code); + } + + // Get the parent DirectoryEntry + entry.getParent(success, fail); + + +## createWriter + +Créer un `FileWriter` objet associé au fichier représenté par la`FileEntry`. + +**Paramètres :** + +* **successCallback**: un rappel passé un `FileWriter` objet. *(Fonction)* + +* **errorCallback**: un rappel qui s'exécute si une erreur se produit lors de la tentative de créer le FileWriter. Appelée avec un `FileError` objet. *(Fonction)* + +**Petit exemple** + + function success(writer) { + writer.write("Some text to the file"); + } + + function fail(error) { + alert(error.code); + } + + // create a FileWriter to write to the file + entry.createWriter(success, fail); + + +## fichier + +Retourner un `File` objet qui représente l'état actuel du dossier que cette `FileEntry` représente. + +**Paramètres :** + +* **successCallback**: un rappel passé un `File` objet. *(Fonction)* + +* **errorCallback**: un rappel qui s'exécute si une erreur se produit lorsque vous créez le `File` objet, par exemple lorsque le fichier n'existe plus. Appelée avec un `FileError` objet. *(Fonction)* + +**Petit exemple** + + function success(file) { + console.log("File size: " + file.size); + } + + function fail(error) { + alert("Unable to retrieve file properties: " + error.code); + } + + // obtain properties of a file + entry.file(success, fail); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/fileerror/fileerror.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/fileerror/fileerror.md b/docs/fr/edge/cordova/file/fileerror/fileerror.md new file mode 100644 index 0000000..01306e5 --- /dev/null +++ b/docs/fr/edge/cordova/file/fileerror/fileerror.md @@ -0,0 +1,42 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# FileError + +A `FileError` objet est défini lorsqu'une erreur se produit dans l'une des méthodes API de fichier. + +## Propriétés + +* **code**: l'un des codes d'erreur prédéfinis énumérés ci-dessous. + +## Constantes + +* `FileError.NOT_FOUND_ERR` +* `FileError.SECURITY_ERR` +* `FileError.ABORT_ERR` +* `FileError.NOT_READABLE_ERR` +* `FileError.ENCODING_ERR` +* `FileError.NO_MODIFICATION_ALLOWED_ERR` +* `FileError.INVALID_STATE_ERR` +* `FileError.SYNTAX_ERR` +* `FileError.INVALID_MODIFICATION_ERR` +* `FileError.QUOTA_EXCEEDED_ERR` +* `FileError.TYPE_MISMATCH_ERR` +* `FileError.PATH_EXISTS_ERR` + +## Description + +Le `FileError` objet est le seul paramètre fourni à l'un des rappels d'erreur de l'API de fichier. Pour déterminer le type d'erreur, comparer sa `code` propriété à aucune des listes ci-dessus. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/fileobj/fileobj.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/fileobj/fileobj.md b/docs/fr/edge/cordova/file/fileobj/fileobj.md new file mode 100644 index 0000000..aad35b8 --- /dev/null +++ b/docs/fr/edge/cordova/file/fileobj/fileobj.md @@ -0,0 +1,76 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# Fichier + +Cet objet contient des attributs d'un fichier unique. + +## Propriétés + +* **nom**: le nom du fichier. *(DOMString)* + +* **fullPath**: le chemin d'accès complet du fichier dont le nom de fichier. *(DOMString)* + +* **type**: le type mime du fichier. *(DOMString)* + +* **lastModifiedDate**: la dernière fois que le fichier a été modifié. *(Date)* + +* **taille**: la taille du fichier en octets. *(long)* + +## Méthodes + +* **tranche**: ne sélectionner qu'une partie du fichier à lire. + +## Détails + +Le `File` objet contient des attributs d'un fichier unique. Vous pouvez obtenir une instance d'un `File` objet en appelant une `FileEntry` de l'objet `file()` méthode. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Windows Phone 7 et 8 +* Windows 8 + +## tranche + +Retourner un nouveau `File` objet, dont `FileReader` retourne uniquement la partie spécifiée du fichier. Négatif pour les valeurs `start` ou `end` sont mesurées à partir de la fin du fichier. Les index sont positionnés par rapport à la tranche actuelle. (Voir l'exemple complet ci-dessous.) + +**Paramètres :** + +* **Démarrer**: l'index du premier octet à lire, inclusivement. + +* **fin**: l'index de l'octet après une dernière lecture. + +**Petit exemple** + + var slicedFile = file.slice(10, 30); + + +**Exemple complet** + + var slice1 = file.slice(100, 400); + var slice2 = slice1.slice(20, 35); + + var slice3 = file.slice(120, 135); + // slice2 and slice3 are equivalent. + + +**Plates-formes prises en charge** + +* Android +* iOS \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/filereader/filereader.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/filereader/filereader.md b/docs/fr/edge/cordova/file/filereader/filereader.md new file mode 100644 index 0000000..ce85cbf --- /dev/null +++ b/docs/fr/edge/cordova/file/filereader/filereader.md @@ -0,0 +1,253 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# FileReader + +Le `FileReader` permet l'accès à un fichier de base. + +## Propriétés + +* **readyState**: un des lecteur de trois possible précise, soit `EMPTY` , `LOADING` ou`DONE`. + +* **résultat**: le contenu du fichier qui ont été lus. *(DOMString)* + +* **erreur**: un objet contenant des erreurs. *(FileError)* + +* **onloadstart**: appelé au démarrage de la lecture. *(Fonction)* + +* **OnLoad**: appelé lorsque la lecture a complété avec succès. *(Fonction)* + +* **OnAbort**: appelé lorsque la lecture a été abandonnée. Par exemple, en appelant le `abort()` méthode. *(Fonction)* + +* **OnError**: appelé lorsque la lecture a échoué. *(Fonction)* + +* **onloadend**: appelé lorsque la demande est terminée (que ce soit dans le succès ou l'échec). *(Fonction)* + +**Remarque :** Le porperty suivant n'est pas pris en charge : + +* **OnProgress**: appelée lors de la lecture du fichier, faisant état de progrès en termes de `progress.loaded` / `progress.total` . *(Fonction)* + +## Méthodes + +* **Abort**: abandons de lecture du fichier. + +* **readAsDataURL**: lire le fichier et renvoyer les données sous forme d'une URL de données codées en base64. + +* **readAsText**: lectures du fichier texte. + +* **readAsBinaryString**: lit le fichier binaire et retourne une chaîne binaire. + +* **readAsArrayBuffer**: lectures du fichier comme un`ArrayBuffer`. + +## Détails + +Le `FileReader` objet offre un moyen de lire les fichiers de système de fichiers de l'appareil. Les fichiers peuvent être lus sous forme de texte ou comme une chaîne de données codées en base64. Écouteurs d'événements recevoir la `loadstart` , `progress` , `load` , `loadend` , `error` , et `abort` des événements. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Windows Phone 7 et 8 +* Windows 8 + +## Lire comme données URL + +**Paramètres :** + +* **fichier**: l'objet du fichier à lire. + +## Petit exemple + + function win(file) { + var reader = new FileReader(); + reader.onloadend = function (evt) { + console.log("read success"); + console.log(evt.target.result); + }; + reader.readAsDataURL(file); + }; + + var fail = function (evt) { + console.log(error.code); + }; + + entry.file(win, fail); + + +## Lire sous forme de texte + +**Paramètres :** + +* **fichier**: l'objet du fichier à lire. + +* **codage**: le codage à utiliser pour coder le contenu du fichier. Valeur par défaut est UTF8. + +## Petit exemple + + function win(file) { + var reader = new FileReader(); + reader.onloadend = function (evt) { + console.log("read success"); + console.log(evt.target.result); + }; + reader.readAsText(file); + }; + + var fail = function (evt) { + console.log(error.code); + }; + + entry.file(win, fail); + + +## Abandon rapide exemple + + function win(file) { + var reader = new FileReader(); + reader.onloadend = function(evt) { + console.log("read success"); + console.log(evt.target.result); + }; + reader.readAsText(file); + reader.abort(); + }; + + function fail(error) { + console.log(error.code); + } + + entry.file(win, fail); + + +## Exemple complet + + + + + FileReader Example + + + + + +

Example

+

Read File

+ + + + +## iOS Quirks + +* Le paramètre **encoding** n'est pas pris en charge, et le codage UTF8 est toujours en vigueur. + +## Lire comme chaîne binaire + +Actuellement pris en charge sur iOS et Android uniquement. + +**Paramètres :** + +* **fichier**: l'objet du fichier à lire. + +## Petit exemple + + function win(file) { + var reader = new FileReader(); + reader.onloadend = function (evt) { + console.log("read success"); + console.log(evt.target.result); + }; + reader.readAsBinaryString(file); + }; + + var fail = function (evt) { + console.log(error.code); + }; + + entry.file(win, fail); + + +## Lu dans le tampon de tableau + +Actuellement pris en charge sur iOS et Android uniquement. + +**Paramètres :** + +* **fichier**: l'objet du fichier à lire. + +## Petit exemple + + function win(file) { + var reader = new FileReader(); + reader.onloadend = function (evt) { + console.log("read success"); + console.log(new Uint8Array(evt.target.result)); + }; + reader.readAsArrayBuffer(file); + }; + + var fail = function (evt) { + console.log(error.code); + }; + + entry.file(win, fail); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/filesystem/filesystem.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/filesystem/filesystem.md b/docs/fr/edge/cordova/file/filesystem/filesystem.md new file mode 100644 index 0000000..6d1b2c5 --- /dev/null +++ b/docs/fr/edge/cordova/file/filesystem/filesystem.md @@ -0,0 +1,85 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# Système de fichiers + +Cet objet représente un système de fichiers. + +## Propriétés + +* **nom**: le nom du système de fichiers. *(DOMString)* + +* **racine**: le répertoire racine du système de fichiers. *(DirectoryEntry)* + +## Détails + +Le `FileSystem` objet représente des informations sur le système de fichiers. Le nom du système de fichiers est unique dans l'ensemble de la liste des systèmes de fichiers exposées. La propriété root contient un `DirectoryEntry` objet qui représente le répertoire racine du système fichier. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Windows Phone 7 et 8 +* Windows 8 + +## Exemple de fichier rapide de système + + function onSuccess(fileSystem) { + console.log(fileSystem.name); + console.log(fileSystem.root.name); + } + + // request the persistent file system + window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onSuccess, null); + + +## Exemple complet + + + + + File System Example + + + + + +

Example

+

File System

+ + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/filetransfer/filetransfer.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/filetransfer/filetransfer.md b/docs/fr/edge/cordova/file/filetransfer/filetransfer.md new file mode 100644 index 0000000..fa3998b --- /dev/null +++ b/docs/fr/edge/cordova/file/filetransfer/filetransfer.md @@ -0,0 +1,269 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# Transfert de fichiers + +Le `FileTransfer` objet permet de charger ou télécharger des fichiers vers et depuis un serveur. + +## Propriétés + +* **OnProgress**: appelée avec une `ProgressEvent` chaque fois qu'un nouveau segment de données est transféré. *(Fonction)* + +## Méthodes + +* **Télécharger**: envoie un fichier sur un serveur. + +* **Télécharger**: télécharge un fichier de serveur. + +* **Annuler**: annule un transfert en cours. + +## Détails + +Le `FileTransfer` objet fournit un moyen de télécharger des fichiers sur un serveur distant à l'aide d'une requête HTTP de la poste multi-partie. Les protocoles HTTP et HTTPS sont supportés. Paramètres optionnels peuvent être spécifiés en passant une `FileUploadOptions` s'opposer à la `upload()` méthode. Le téléchargement réussi, un `FileUploadResult` objet est passé au rappel succès. Si une erreur survient, un `FileTransferError` objet est passé au rappel erreur. Il est également possible (uniquement sur iOS et Android) pour télécharger un fichier depuis un serveur distant et l'enregistrer sur l'appareil. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Windows Phone 7 et 8 +* Windows 8 + +## Télécharger + +**Paramètres :** + +* **filePath**: chemin d'accès complet du fichier sur le périphérique. + +* **serveur**: URL du serveur de réception du fichier, tel qu'il est codé par`encodeURI()`. + +* **successCallback**: un rappel passé un `Metadata` objet. *(Fonction)* + +* **errorCallback**: un rappel qui s'exécute si une erreur survient récupérer la `Metadata` . Appelée avec un `FileTransferError` objet. *(Fonction)* + +* **options**: paramètres facultatifs tels que le nom de fichier et le type MIME. + +* **trustAllHosts**: paramètre facultatif, valeur par défaut est `false` . Si la valeur `true` , il accepte tous les certificats de sécurité. Ceci est utile car Android rejette des certificats auto-signés. Non recommandé pour une utilisation de production. Supporté sur Android et iOS. *(boolean)* + +**Petit exemple** + + // !! Assumes variable fileURI contains a valid URI to a text file on the device + + var win = function (r) { + console.log("Code = " + r.responseCode); + console.log("Response = " + r.response); + console.log("Sent = " + r.bytesSent); + } + + var fail = function (error) { + alert("An error has occurred: Code = " + error.code); + console.log("upload error source " + error.source); + console.log("upload error target " + error.target); + } + + var options = new FileUploadOptions(); + options.fileKey = "file"; + options.fileName = fileURI.substr(fileURI.lastIndexOf('/') + 1); + options.mimeType = "text/plain"; + + var params = {}; + params.value1 = "test"; + params.value2 = "param"; + + options.params = params; + + var ft = new FileTransfer(); + ft.upload(fileURI, encodeURI("http://some.server.com/upload.php"), win, fail, options); + + +**Exemple complet** + + + + + File Transfer Example + + + + + +

Example

+

Upload File

+ + + + +**Réglage Télécharger en-têtes** + +Prise en charge par Android et iOS + + function win(r) { + console.log("Code = " + r.responseCode); + console.log("Response = " + r.response); + console.log("Sent = " + r.bytesSent); + } + + function fail(error) { + alert("An error has occurred: Code = " + error.code); + console.log("upload error source " + error.source); + console.log("upload error target " + error.target); + } + + var uri = encodeURI("http://some.server.com/upload.php"); + + var options = new FileUploadOptions(); + options.fileKey="file"; + options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1); + options.mimeType="text/plain"; + + var headers={'headerParam':'headerValue'}; + + options.headers = headers; + + var ft = new FileTransfer(); + ft.upload(fileURI, uri, win, fail, options); + + +**Quirks Android** + +Définir la `chunkedMode` option pour `false` pour prévenir les problèmes de téléchargement sur un serveur Nginx. + +## Télécharger + +**Paramètres :** + +* **source**: URL du serveur pour télécharger le fichier, tel qu'il est codé par`encodeURI()`. + +* **cible**: chemin d'accès complet du fichier sur le périphérique. + +* **successCallback**: un rappel passé un `FileEntry` objet. *(Fonction)* + +* **errorCallback**: un rappel qui s'exécute si une erreur se produit lors de la récupération du `Metadata` . Appelée avec un `FileTransferError` objet. *(Fonction)* + +* **trustAllHosts**: paramètre facultatif, valeur par défaut est `false` . Si la valeur `true` puis il acceptera tous les certificats de sécurité. Ceci est utile comme Android rejette les certificats de sécurité signé libre. Non recommandé pour une utilisation de production. Supporté sur Android et iOS. *(boolean)* + +* **options**: paramètres facultatifs, actuellement uniquement les supports en-têtes (par exemple l'autorisation (authentification de base), etc.). + +**Petit exemple** + + // !! Suppose filePath est un chemin d'accès valide sur le transfert de fichiers périphérique var = new FileTransfer() ; + var uri = encodeURI ("http://some.server.com/download.php") ; + + fileTransfer.download (uri, filePath, function(entry) {console.log ("téléchargement complet:" + entry.fullPath) ; + }, function(error) {console.log (« source de l'erreur de téléchargement » + error.source) ; + Console.log (« erreur de téléchargement cible » + error.target) ; + Console.log (« code d'erreur de téléchargement » + error.code) ; + }, faux, {en-têtes: {« Autorisation »: « dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA base == "}}) ; + + +## abandonner. + +Abandonne un transfert en cours. Le rappel onerror est passé à un objet FileTransferError qui a un code d'erreur de FileTransferError.ABORT_ERR. + +**Plates-formes prises en charge** + +* Android +* iOS + +**Petit exemple** + + // !! Suppose que la variable fileURI contient un URI valide dans un fichier de texte sur la victoire de var périphérique = function(r) {console.log ("ne devrait pas être appelée.");} + + var fail = function(error) {/ / error.code == FileTransferError.ABORT_ERR alert ("une erreur est survenue : Code =" + error.code) ; + Console.log (« source de l'erreur de téléchargement » + error.source) ; + Console.log ("erreur de téléchargement cible" + error.target);} + + options de var = new FileUploadOptions() ; + options.fileKey="file" ; + options.fileName="myphoto.jpg" ; + options.mimeType="image/jpeg" ; + + ft var = new FileTransfer() ; + ft.upload (fileURI, encodeURI ("http://some.server.com/upload.php"), win, fail, options) ; + ft.Abort() ; + + +## OnProgress + +Appelée avec un ProgressEvent chaque fois qu'un nouveau segment de données est transféré. + +**Plates-formes prises en charge** + +* Android +* iOS + +**Exemple** + + fileTransfer.onprogress = function(progressEvent) { + if (progressEvent.lengthComputable) { + loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total); + } else { + loadingStatus.increment(); + } + }; + fileTransfer.download(...); // or fileTransfer.upload(...); + + +**Quirks** - sur les deux Android un iOS, lengthComputable est `false` pour les téléchargements qui utilisent l'encodage gzip. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/filetransfererror/filetransfererror.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/filetransfererror/filetransfererror.md b/docs/fr/edge/cordova/file/filetransfererror/filetransfererror.md new file mode 100644 index 0000000..f4406c4 --- /dev/null +++ b/docs/fr/edge/cordova/file/filetransfererror/filetransfererror.md @@ -0,0 +1,40 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# FileTransferError + +A `FileTransferError` objet est passé à un rappel d'erreur lorsqu'une erreur survient. + +## Propriétés + +* **code**: l'un des codes d'erreur prédéfinis énumérés ci-dessous. (Nombre) + +* **source**: URI à la source. (String) + +* **cible**: URI à la cible. (String) + +* **HTTP_STATUS**: code d'état HTTP. Cet attribut n'est disponible que lorsqu'un code de réponse est reçu de la connexion HTTP. (Nombre) + +## Constantes + +* `FileTransferError.FILE_NOT_FOUND_ERR` +* `FileTransferError.INVALID_URL_ERR` +* `FileTransferError.CONNECTION_ERR` +* `FileTransferError.ABORT_ERR` + +## Description + +Le `FileTransferError` objet est passé au rappel erreur lorsqu'une erreur se produit lorsque le chargement ou le téléchargement d'un fichier. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/fileuploadoptions/fileuploadoptions.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/fileuploadoptions/fileuploadoptions.md b/docs/fr/edge/cordova/file/fileuploadoptions/fileuploadoptions.md new file mode 100644 index 0000000..9fa72be --- /dev/null +++ b/docs/fr/edge/cordova/file/fileuploadoptions/fileuploadoptions.md @@ -0,0 +1,41 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# FileUploadOptions + +A `FileUploadOptions` objet peut être passé à la `FileTransfer` de l'objet `upload()` pour spécifier des paramètres supplémentaires pour le script d'upload. + +## Propriétés + +* **fileKey**: le nom de l'élément form. Valeur par défaut est `file` . (DOMString) + +* **fileName**: le nom de fichier à utiliser lorsque vous enregistrez le fichier sur le serveur. Valeur par défaut est `image.jpg` . (DOMString) + +* **type MIME**: le type mime des données à télécharger. Valeur par défaut est `image/jpeg` . (DOMString) + +* **params**: un ensemble de paires clé/valeur facultative pour passer dans la requête HTTP. (Objet) + +* **chunkedMode**: s'il faut télécharger les données en mode streaming mémorisé en bloc. Valeur par défaut est `true` . (Boolean) + +* **en-têtes**: une carte des valeurs d'en-tête en-tête/nom. Un tableau permet de spécifier plusieurs valeurs. (Objet) + +## Description + +A `FileUploadOptions` objet peut être passé à la `FileTransfer` de l'objet `upload()` pour spécifier des paramètres supplémentaires pour le script d'upload. + +## Bizarrerie de WP7 + +* **chunkedMode :**: ignoré sur WP7. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/fileuploadresult/fileuploadresult.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/fileuploadresult/fileuploadresult.md b/docs/fr/edge/cordova/file/fileuploadresult/fileuploadresult.md new file mode 100644 index 0000000..958d3ce --- /dev/null +++ b/docs/fr/edge/cordova/file/fileuploadresult/fileuploadresult.md @@ -0,0 +1,35 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# FileUploadResult + +A `FileUploadResult` objet est passé au rappel de succès la `FileTransfer` de l'objet `upload()` méthode. + +## Propriétés + +* **bytesSent**: le nombre d'octets envoyés au serveur dans le cadre du téléchargement. (long) + +* **responseCode**: code de réponse HTTP le retourné par le serveur. (long) + +* **réponse**: réponse The HTTP renvoyé par le serveur. (DOMString) + +## Description + +Le `FileUploadResult` objet est retourné par le rappel de la réussite de la `FileTransfer` de l'objet `upload()` méthode. + +## iOS Quirks + +* Ne prend pas en charge `responseCode` ou`bytesSent`. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/filewriter/filewriter.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/filewriter/filewriter.md b/docs/fr/edge/cordova/file/filewriter/filewriter.md new file mode 100644 index 0000000..1483ed0 --- /dev/null +++ b/docs/fr/edge/cordova/file/filewriter/filewriter.md @@ -0,0 +1,230 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# FileWriter + +En tant qu'objet permet de créer et d'écrire des données dans un fichier. + +## Propriétés + +* **readyState**: un des trois États possibles, soit `INIT` , `WRITING` , ou`DONE`. + +* **fileName**: le nom du fichier à écrire. *(DOMString)* + +* **longueur**: la longueur du fichier à écrire. *(long)* + +* **position**: la position actuelle du pointeur de la file. *(long)* + +* **erreur**: un objet contenant des erreurs. *(FileError)* + +* **onwritestart**: appelé au démarrage de l'écriture. *(Fonction)* + +* **onwrite**: appelé lorsque la requête s'est terminée correctement. *(Fonction)* + +* **OnAbort**: appelé lorsque l'écriture a été abandonnée. Par exemple, en appelant la méthode abort(). *(Fonction)* + +* **OnError**: appelé lorsque l'écriture a échoué. *(Fonction)* + +* **onwriteend**: appelé lorsque la demande est terminée (que ce soit dans le succès ou l'échec). *(Fonction)* + +La propriété suivante n'est *pas* supportée : + +* **OnProgress**: appelée lors de l'écriture du fichier, faisant état de progrès en termes de `progress.loaded` / `progress.total` . *(Fonction)* + +## Méthodes + +* **Annuler**: annule l'écriture du fichier. + +* **Rechercher**: déplace le pointeur de fichier à l'octet spécifié. + +* **tronquer**: raccourcit le fichier à la longueur spécifiée. + +* **écrire**: écrit les données dans le fichier. + +## Détails + +Le `FileWriter` objet offre la possibilité d'écrire des fichiers codés en UTF-8 pour le système de fichiers du périphérique. Les applications répondent aux `writestart` , `progress` , `write` , `writeend` , `error` , et `abort` des événements. + +Chaque `FileWriter` correspond à un fichier unique, à laquelle les données peuvent être écrites plusieurs fois. La `FileWriter` maintient du fichier `position` et `length` attributs, qui permettent l'application pour `seek` et `write` n'importe où dans le fichier. Par défaut, le `FileWriter` écrit au début du fichier, en remplaçant les données existantes. Définissez le paramètre optionnel `append` booléen à `true` dans la `FileWriter` de constructeur pour écrire à la fin du fichier. + +Données textuelles sont pris en charge par toutes les plates-formes répertoriées ci-dessous. Texte est codé au format UTF-8 avant d'être écrites sur le système de fichiers. Certaines plates-formes soutiennent également les données binaires, qui peuvent être passées comme un ArrayBuffer ou un objet Blob. + +## Plates-formes prises en charge + +Texte et binaire Support : + +* Android +* iOS + +Support de texte uniquement : + +* BlackBerry WebWorks (OS 5.0 et plus) +* Windows Phone 7 et 8 +* Windows 8 + +## Chercher petit exemple + + function win(writer) { + // fast forwards file pointer to end of file + writer.seek(writer.length); + }; + + var fail = function(evt) { + console.log(error.code); + }; + + entry.createWriter(win, fail); + + +## Petit exemple de tronquer + + function win(writer) { + writer.truncate(10); + }; + + var fail = function(evt) { + console.log(error.code); + }; + + entry.createWriter(win, fail); + + +## Écrire exemple rapide + + function win(writer) { + writer.onwrite = function(evt) { + console.log("write success"); + }; + writer.write("some sample text"); + }; + + var fail = function(evt) { + console.log(error.code); + }; + + entry.createWriter(win, fail); + + +## Binaire écrire exemple rapide + + function win(writer) { + var data = new ArrayBuffer(5), + dataView = new Int8Array(data); + for (i=0; i < 5; i++) { + dataView[i] = i; + } + writer.onwrite = function(evt) { + console.log("write success"); + }; + writer.write(data); + }; + + var fail = function(evt) { + console.log(error.code); + }; + + entry.createWriter(win, fail); + + +## Ajouter exemple rapide + + function win(writer) { + writer.onwrite = function(evt) { + console.log("write success"); + }; + writer.seek(writer.length); + writer.write("appended text"); + }; + + var fail = function(evt) { + console.log(error.code); + }; + + entry.createWriter(win, fail); + + +## Abandon rapide exemple + + function win(writer) { + writer.onwrite = function(evt) { + console.log("write success"); + }; + writer.write("some sample text"); + writer.abort(); + }; + + var fail = function(evt) { + console.log(error.code); + }; + + entry.createWriter(win, fail); + + +## Exemple complet + + + + + FileWriter Example + + + + + +

Example

+

Write File

+ + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/flags/flags.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/flags/flags.md b/docs/fr/edge/cordova/file/flags/flags.md new file mode 100644 index 0000000..9ee6e95 --- /dev/null +++ b/docs/fr/edge/cordova/file/flags/flags.md @@ -0,0 +1,41 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# Drapeaux + +Fournit des arguments à la `DirectoryEntry` de l'objet `getFile()` et `getDirectory()` méthodes qui chercher ou créent des fichiers et des répertoires, respectivement. + +## Propriétés + +* **créer**: indique que le fichier ou le répertoire doit être créé s'il n'existe pas déjà. *(booléen)* + +* **exclusif**: A n'a aucun effet en soi, mais lorsqu'il est utilisé avec `create` provoque la création de fichier ou de répertoire échoue si le chemin d'accès cible existe déjà. *(booléen)* + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Windows Phone 7 et 8 +* Windows 8 + +## Petit exemple + + / / Obtenir le répertoire de données, créant si elle n'existe pas. + dataDir = fileSystem.root.getDirectory (« données », {créer : true}) ; + + / / Créer le fichier de verrouillage, si et seulement s'il n'existe pas. + lockFile = dataDir.getFile (« lockfile.txt », {créer : vrai, exclusif : true}) ; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/localfilesystem/localfilesystem.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/localfilesystem/localfilesystem.md b/docs/fr/edge/cordova/file/localfilesystem/localfilesystem.md new file mode 100644 index 0000000..ec53583 --- /dev/null +++ b/docs/fr/edge/cordova/file/localfilesystem/localfilesystem.md @@ -0,0 +1,103 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# Local + +Cet objet fournit un moyen d'obtenir des systèmes de fichiers racine. + +## Méthodes + +* **requestFileSystem**: demande un système de fichiers. *(Fonction)* + +* **resolveLocalFileSystemURI**: récupérer un `DirectoryEntry` ou `FileEntry` à l'aide d'URI local. *(Fonction)* + +## Constantes + +* `LocalFileSystem.PERSISTENT`: Utilisé pour le stockage, ce qui ne devrait pas être retiré par l'agent utilisateur sans autorisation d'application ou utilisateur. + +* `LocalFileSystem.TEMPORARY`: Utilisé pour le stockage sans garantie de persistance. + +## Détails + +Les `LocalFileSystem` méthodes de l'objet sont définis sur le `window` objet. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Windows Phone 7 et 8 +* Windows 8 + +## Demande de fichier système exemple rapide + + function onSuccess(fileSystem) { + console.log(fileSystem.name); + } + + // request the persistent file system + window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onSuccess, onError); + + +## Résoudre le système de fichiers Local URI petit exemple + + function onSuccess(fileEntry) { + console.log(fileEntry.name); + } + + window.resolveLocalFileSystemURI("file:///example.txt", onSuccess, onError); + + +## Exemple complet + + + + + Local File System Example + + + + + +

Example

+

Local File System

+ + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/file/metadata/metadata.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/file/metadata/metadata.md b/docs/fr/edge/cordova/file/metadata/metadata.md new file mode 100644 index 0000000..1be418c --- /dev/null +++ b/docs/fr/edge/cordova/file/metadata/metadata.md @@ -0,0 +1,44 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# Métadonnées + +Une interface qui fournit des informations sur l'état d'un fichier ou un répertoire. + +## Propriétés + +* **modificationTime**: le temps où le fichier ou le répertoire a été modifié. *(Date)* + +## Détails + +Le `Metadata` objet représente des informations sur l'état d'un fichier ou un répertoire. Appeler un `DirectoryEntry` ou `FileEntry` de l'objet `getMetadata()` méthode se traduit par une `Metadata` instance. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Windows Phone 7 et 8 +* Windows 8 + +## Petit exemple + + function win(metadata) { + console.log("Last Modified: " + metadata.modificationTime); + } + + // Request the metadata object for this entry + entry.getMetadata(win, null); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/geolocation/Coordinates/coordinates.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/geolocation/Coordinates/coordinates.md b/docs/fr/edge/cordova/geolocation/Coordinates/coordinates.md new file mode 100644 index 0000000..1d1ac01 --- /dev/null +++ b/docs/fr/edge/cordova/geolocation/Coordinates/coordinates.md @@ -0,0 +1,123 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# Coordonnées + +Un ensemble de propriétés qui décrivent les coordonnées géographiques d'une position. + +## Propriétés + +* **Latitude**: Latitude en degrés décimaux. *(Nombre)* + +* **longitude**: Longitude en degrés décimaux. *(Nombre)* + +* **altitude**: hauteur de la position en mètres au-dessus de l'ellipsoïde. *(Nombre)* + +* **précision**: degré de précision des coordonnées latitude et longitude en mètres. *(Nombre)* + +* **altitudeAccuracy**: niveau d'exactitude de la coordonnée de l'altitude en mètres. *(Nombre)* + +* **rubrique**: sens de marche, indiquée en degrés comptage dans le sens horaire par rapport au nord vrai. *(Nombre)* + +* **vitesse**: vitesse actuelle de l'appareil, indiquée en mètres par seconde. *(Nombre)* + +## Description + +Le `Coordinates` objet est attaché à la `Position` objet qui n'existe pas de fonctions de rappel dans les requêtes pour la position actuelle. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +## Petit exemple + + // onSuccess Callback + // + var onSuccess = function(position) { + alert('Latitude: ' + position.coords.latitude + '\n' + + 'Longitude: ' + position.coords.longitude + '\n' + + 'Altitude: ' + position.coords.altitude + '\n' + + 'Accuracy: ' + position.coords.accuracy + '\n' + + 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' + + 'Heading: ' + position.coords.heading + '\n' + + 'Speed: ' + position.coords.speed + '\n' + + 'Timestamp: ' + position.timestamp + '\n'); + }; + + // onError Callback + // + var onError = function() { + alert('onError!'); + }; + + navigator.geolocation.getCurrentPosition(onSuccess, onError); + + +## Exemple complet + + + + + Geolocation Position Example + + + + +
+ + + + +## Quirks Android + +**altitudeAccuracy**: ne pas pris en charge par les appareils Android, retour`null`. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/geolocation/Position/position.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/geolocation/Position/position.md b/docs/fr/edge/cordova/geolocation/Position/position.md new file mode 100644 index 0000000..623bc0a --- /dev/null +++ b/docs/fr/edge/cordova/geolocation/Position/position.md @@ -0,0 +1,111 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# Position + +Contient `Position` coordonnées et timestamp, créé par l'API de géolocalisation. + +## Propriétés + +* **CoOrds**: un système de coordonnées géographiques. *(Coordonnées)* + +* **timestamp**: horodatage de création pour `coords` . *(Date)* + +## Description + +Le `Position` objet est créé et peuplé de Cordova et retourné à l'utilisateur via une fonction de rappel. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +## Petit exemple + + // onSuccess Callback + // + var onSuccess = function(position) { + alert('Latitude: ' + position.coords.latitude + '\n' + + 'Longitude: ' + position.coords.longitude + '\n' + + 'Altitude: ' + position.coords.altitude + '\n' + + 'Accuracy: ' + position.coords.accuracy + '\n' + + 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' + + 'Heading: ' + position.coords.heading + '\n' + + 'Speed: ' + position.coords.speed + '\n' + + 'Timestamp: ' + position.timestamp + '\n'); + }; + + // onError Callback receives a PositionError object + // + function onError(error) { + alert('code: ' + error.code + '\n' + + 'message: ' + error.message + '\n'); + } + + navigator.geolocation.getCurrentPosition(onSuccess, onError); + + +## Exemple complet + + + + + Device Properties Example + + + + + +

Finding geolocation...

+ + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/geolocation/PositionError/positionError.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/geolocation/PositionError/positionError.md b/docs/fr/edge/cordova/geolocation/PositionError/positionError.md new file mode 100644 index 0000000..d543082 --- /dev/null +++ b/docs/fr/edge/cordova/geolocation/PositionError/positionError.md @@ -0,0 +1,47 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# PositionError + +A `PositionError` objet est passé à la `geolocationError` rappel lorsqu'une erreur survient. + +## Propriétés + +* **code**: l'un des codes d'erreur prédéfinis énumérés ci-dessous. + +* **message**: message d'erreur décrivant les détails de l'erreur rencontrée. + +## Constantes + +* `PositionError.PERMISSION_DENIED` +* `PositionError.POSITION_UNAVAILABLE` +* `PositionError.TIMEOUT` + +## Description + +Le `PositionError` objet est passé à la `geolocationError` fonction de rappel lorsqu'une erreur se produit avec géolocalisation. + +### `PositionError.PERMISSION_DENIED` + +Retourné lorsque l'utilisateur n'autorise pas de votre application extraire des informations de position. Cela dépend de la plate-forme. + +### `PositionError.POSITION_UNAVAILABLE` + +Retourné lorsque le périphérique n'est pas en mesure de récupérer une position. En général cela signifie que l'appareil n'a aucune connectivité réseau et/ou ne peut pas obtenir un correctif de satellite. + +### `PositionError.TIMEOUT` + +Retourné lorsque le périphérique n'est pas en mesure de récupérer une position dans le délai précisé dans la `geolocationOptions` ' `timeout` propriété. Lorsqu'il est utilisé avec `geolocation.watchPosition` , cette erreur pourrait être transmise à la `geolocationError` rappel chaque `timeout` millisecondes. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/geolocation/geolocation.clearWatch.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/geolocation/geolocation.clearWatch.md b/docs/fr/edge/cordova/geolocation/geolocation.clearWatch.md new file mode 100644 index 0000000..011f614 --- /dev/null +++ b/docs/fr/edge/cordova/geolocation/geolocation.clearWatch.md @@ -0,0 +1,108 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# geolocation.clearWatch + +Arrêter de regarder pour les modifications à l'emplacement de l'appareil référencé par le `watchID` paramètre. + + navigator.geolocation.clearWatch(watchID); + + +## Paramètres + +* **watchID**: l'id de la `watchPosition` intervalle à effacer. (String) + +## Description + +Le `geolocation.clearWatch` cesse de regarder les modifications apportées à l'emplacement de l'appareil en désactivant le `geolocation.watchPosition` référencé par`watchID`. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +## Petit exemple + + / / Options : suivi des modifications dans la position et utilise le plus / / exacte position méthode d'acquisition disponible. + // + var watchID = navigator.geolocation.watchPosition(onSuccess, onError, { enableHighAccuracy: true }); + + // ...later on... + + navigator.geolocation.clearWatch(watchID); + + +## Exemple complet + + + + + Device Properties Example + + + + + +

Watching geolocation...

+ + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/fr/edge/cordova/geolocation/geolocation.getCurrentPosition.md ---------------------------------------------------------------------- diff --git a/docs/fr/edge/cordova/geolocation/geolocation.getCurrentPosition.md b/docs/fr/edge/cordova/geolocation/geolocation.getCurrentPosition.md new file mode 100644 index 0000000..d4bfb16 --- /dev/null +++ b/docs/fr/edge/cordova/geolocation/geolocation.getCurrentPosition.md @@ -0,0 +1,120 @@ +--- + +license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + + + under the License. +--- + +# geolocation.getCurrentPosition + +Retourne la position actuelle de l'appareil comme un `Position` objet. + + navigator.geolocation.getCurrentPosition(geolocationSuccess, + [geolocationError], + [geolocationOptions]); + + +## Paramètres + +* **geolocationSuccess**: la fonction de rappel qui est passée de la position actuelle. + +* **geolocationError**: *(facultatif)* la fonction de rappel qui s'exécute si une erreur survient. + +* **geolocationOptions**: *(facultatif)* les options de géolocalisation. + +## Description + +`geolocation.getCurrentPosition`est une fonction asynchrone. Elle retourne la position actuelle de l'appareil à la `geolocationSuccess` rappel avec un `Position` objet comme paramètre. Si une erreur se produit, le `geolocationError` rappel est passé un `PositionError` objet. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +## Petit exemple + + // onSuccess Callback + // This method accepts a Position object, which contains the + // current GPS coordinates + // + var onSuccess = function(position) { + alert('Latitude: ' + position.coords.latitude + '\n' + + 'Longitude: ' + position.coords.longitude + '\n' + + 'Altitude: ' + position.coords.altitude + '\n' + + 'Accuracy: ' + position.coords.accuracy + '\n' + + 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' + + 'Heading: ' + position.coords.heading + '\n' + + 'Speed: ' + position.coords.speed + '\n' + + 'Timestamp: ' + position.timestamp + '\n'); + }; + + // onError Callback receives a PositionError object + // + function onError(error) { + alert('code: ' + error.code + '\n' + + 'message: ' + error.message + '\n'); + } + + navigator.geolocation.getCurrentPosition(onSuccess, onError); + + +## Exemple complet + + + + + Device Properties Example + + + + + +

Finding geolocation...

+ + \ No newline at end of file