1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/LockedFile.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,48 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtaone at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +dictionary DOMFileMetadataParameters 1.9 +{ 1.10 + boolean size = true; 1.11 + boolean lastModified = true; 1.12 +}; 1.13 + 1.14 +interface LockedFile : EventTarget 1.15 +{ 1.16 + readonly attribute FileHandle? fileHandle; 1.17 + readonly attribute FileMode mode; 1.18 + readonly attribute boolean active; 1.19 + attribute unsigned long long? location; 1.20 + 1.21 + [Throws] 1.22 + FileRequest? getMetadata(optional DOMFileMetadataParameters parameters); 1.23 + [Throws] 1.24 + FileRequest? readAsArrayBuffer(unsigned long long size); 1.25 + [Throws] 1.26 + FileRequest? readAsText(unsigned long long size, 1.27 + optional DOMString? encoding = null); 1.28 + 1.29 + [Throws] 1.30 + FileRequest? write(ArrayBuffer value); 1.31 + [Throws] 1.32 + FileRequest? write(Blob value); 1.33 + [Throws] 1.34 + FileRequest? write(DOMString value); 1.35 + [Throws] 1.36 + FileRequest? append(ArrayBuffer value); 1.37 + [Throws] 1.38 + FileRequest? append(Blob value); 1.39 + [Throws] 1.40 + FileRequest? append(DOMString value); 1.41 + [Throws] 1.42 + FileRequest? truncate(optional unsigned long long size); 1.43 + [Throws] 1.44 + FileRequest? flush(); 1.45 + [Throws] 1.46 + void abort(); 1.47 + 1.48 + attribute EventHandler oncomplete; 1.49 + attribute EventHandler onabort; 1.50 + attribute EventHandler onerror; 1.51 +};