1 /********************************************** 2 * Copyright (C) 2011 Lukas laag 3 * This file is part of lib-gwt-file. 4 * 5 * lib-gwt-file is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU Lesser General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * lib-gwt-file is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with lib-gwt-file. If not, see http://www.gnu.org/licenses/ 17 **********************************************/ 18 /** 19 * Documentation is adapted from W3C spec and content available from 20 * http://developer.mozilla.org under http://creativecommons.org/licenses/by-sa/2.5/ 21 */ 22 package org.vectomatic.file; 23 24 import com.google.gwt.core.client.JsDate; 25 26 /** 27 * The File object provides information about and access to the contents of 28 * files. These are generally retrieved from a 29 * {@link org.vectomatic.file.FileList} object returned as a result of a user 30 * selecting files using the input element, or from a drag and drop operation's 31 * {@link org.vectomatic.dnd.DataTransferExt} object. 32 */ 33 public class File extends Blob { 34 protected File() { 35 } 36 /** 37 * The name of the file referenced by the File object. 38 * @return The name of the file referenced by the File object. 39 */ 40 public final native String getName() /*-{ 41 return this.name; 42 }-*/; 43 /** 44 * The last modified date of the file. If unavailable, returns null. 45 * @return The last modified date of the file. 46 */ 47 public final native JsDate getLastModifiedDate() /*-{ 48 return this.lastModifiedDate; 49 }-*/; 50 }