author | František Kučera <franta-hg@frantovo.cz> |
Thu Jul 05 14:27:01 2012 +0200 (2012-07-05) | |
changeset 106 | ae484a54d7fb |
parent 76 | c7746d95283d |
child 113 | 18bf0044f5ab |
permissions | -rw-r--r-- |
franta-hg@61 | 1 |
/** |
franta-hg@61 | 2 |
* XML Web generátor – program na generování webových stránek |
franta-hg@61 | 3 |
* Copyright © 2012 František Kučera (frantovo.cz) |
franta-hg@61 | 4 |
* |
franta-hg@61 | 5 |
* This program is free software: you can redistribute it and/or modify |
franta-hg@61 | 6 |
* it under the terms of the GNU General Public License as published by |
franta-hg@61 | 7 |
* the Free Software Foundation, either version 3 of the License, or |
franta-hg@61 | 8 |
* (at your option) any later version. |
franta-hg@61 | 9 |
* |
franta-hg@61 | 10 |
* This program is distributed in the hope that it will be useful, |
franta-hg@61 | 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
franta-hg@61 | 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
franta-hg@61 | 13 |
* GNU General Public License for more details. |
franta-hg@61 | 14 |
* |
franta-hg@61 | 15 |
* You should have received a copy of the GNU General Public License |
franta-hg@61 | 16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
franta-hg@61 | 17 |
*/ |
franta-hg@6 | 18 |
package cz.frantovo.xmlWebGenerator; |
franta-hg@6 | 19 |
|
franta-hg@6 | 20 |
import java.io.File; |
franta-hg@6 | 21 |
import java.util.Date; |
franta-hg@6 | 22 |
import java.net.URI; |
franta-hg@6 | 23 |
import java.net.URISyntaxException; |
franta-hg@6 | 24 |
|
franta-hg@28 | 25 |
/** |
franta-hg@76 | 26 |
* Společná knihovna funkcí volaných z XSLT |
franta-hg@28 | 27 |
* |
franta-hg@76 | 28 |
* @author František Kučera (frantovo.cz) |
franta-hg@28 | 29 |
*/ |
franta-hg@6 | 30 |
public class Funkce { |
franta-hg@87 | 31 |
|
franta-hg@28 | 32 |
/** |
franta-hg@28 | 33 |
* Zjištuje, kdy byl naposledy daný soubor změněn. |
franta-hg@28 | 34 |
* @param soubor cesta k souboru |
franta-hg@28 | 35 |
* @return datum poslední změny |
franta-hg@28 | 36 |
* @throws URISyntaxException |
franta-hg@28 | 37 |
*/ |
franta-hg@21 | 38 |
public static Date posledníZměna(String soubor) throws URISyntaxException { |
franta-hg@28 | 39 |
URI uri = new URI(soubor); |
franta-hg@28 | 40 |
File f = new File(uri); |
franta-hg@28 | 41 |
return new Date(f.lastModified()); |
franta-hg@21 | 42 |
} |
franta-hg@6 | 43 |
} |
franta-hg@87 | 44 |