šablona/funkce/src/cz/frantovo/xmlWebGenerator/Funkce.java
author František Kučera <franta-hg@frantovo.cz>
Sat, 14 Jan 2012 19:10:26 +0100
changeset 87 25dec6931f18
parent 76 c7746d95283d
child 113 18bf0044f5ab
permissions -rw-r--r--
Lepší odsazení, tabulátory.
     1 /**
     2  * XML Web generátor – program na generování webových stránek
     3  * Copyright © 2012 František Kučera (frantovo.cz)
     4  * 
     5  * This program is free software: you can redistribute it and/or modify
     6  * it under the terms of the GNU 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  * This program 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 General Public License for more details.
    14  * 
    15  * You should have received a copy of the GNU General Public License
    16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 package cz.frantovo.xmlWebGenerator;
    19 
    20 import java.io.File;
    21 import java.util.Date;
    22 import java.net.URI;
    23 import java.net.URISyntaxException;
    24 
    25 /**
    26  * Společná knihovna funkcí volaných z XSLT
    27  *  
    28  * @author František Kučera (frantovo.cz)
    29  */
    30 public class Funkce {
    31 
    32 	/**
    33 	 * Zjištuje, kdy byl naposledy daný soubor změněn.
    34 	 * @param soubor cesta k souboru
    35 	 * @return datum poslední změny
    36 	 * @throws URISyntaxException
    37 	 */
    38 	public static Date posledníZměna(String soubor) throws URISyntaxException {
    39 		URI uri = new URI(soubor);
    40 		File f = new File(uri);
    41 		return new Date(f.lastModified());
    42 	}
    43 }
    44