From 685f6a985cf80cf1784202c5343ea77b8b1d6daf Mon Sep 17 00:00:00 2001 From: esoe Date: Tue, 15 Nov 2022 17:59:03 +0300 Subject: [PATCH] qq --- out/{war => var}/www/html/css/style.css | 0 out/{war => var}/www/html/index.html | 0 out/{war => var}/www/html/js/main.js | 0 .../sourceListener/apache2/ApacheService.java | 57 ++++++++++++++++++ .../apache2/ApacheService.class | Bin 0 -> 3727 bytes 5 files changed, 57 insertions(+) rename out/{war => var}/www/html/css/style.css (100%) rename out/{war => var}/www/html/index.html (100%) rename out/{war => var}/www/html/js/main.js (100%) create mode 100644 src/main/java/ru/molokoin/sourceListener/apache2/ApacheService.java create mode 100644 target/classes/ru/molokoin/sourceListener/apache2/ApacheService.class diff --git a/out/war/www/html/css/style.css b/out/var/www/html/css/style.css similarity index 100% rename from out/war/www/html/css/style.css rename to out/var/www/html/css/style.css diff --git a/out/war/www/html/index.html b/out/var/www/html/index.html similarity index 100% rename from out/war/www/html/index.html rename to out/var/www/html/index.html diff --git a/out/war/www/html/js/main.js b/out/var/www/html/js/main.js similarity index 100% rename from out/war/www/html/js/main.js rename to out/var/www/html/js/main.js diff --git a/src/main/java/ru/molokoin/sourceListener/apache2/ApacheService.java b/src/main/java/ru/molokoin/sourceListener/apache2/ApacheService.java new file mode 100644 index 0000000..7a6b11c --- /dev/null +++ b/src/main/java/ru/molokoin/sourceListener/apache2/ApacheService.java @@ -0,0 +1,57 @@ +package ru.molokoin.sourceListener.apache2; + +import java.io.IOException; +import java.nio.file.DirectoryIteratorException; +import java.nio.file.DirectoryStream; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.LinkOption; +import java.nio.file.Path; +import java.nio.file.Paths; + +/** + * Класс предоставляет инструменты адаптации контента, для размещения на запущеный сервер apache2 + */ +public class ApacheService { + public static void main(String[] args) throws IOException { + //перечисление корневых каталогов файловой системы + Iterable dirs = FileSystems.getDefault().getRootDirectories(); + for (Path name: dirs) { + System.err.println(name); + } + + /** + * перечисление содержимого каталога + * .. не проходит по внутренним каталогам + */ + Path dir = Paths.get("C:\\Users\\Strannik\\Documents\\esoe\\code\\sourceListener\\out\\zip\\molokoin-client-master.zip"); + System.out.println("Перечисляем содержимое каталога: " + dir.toString()); + + try (DirectoryStream stream = Files.newDirectoryStream(dir)) { + for (Path file: stream) { + System.out.println(file.getFileName()); + } + } catch (IOException | DirectoryIteratorException x) { + // IOException не может броситься во время итерации. + // В этом куске кода оно может броситься только + // методом newDirectoryStream. + System.err.println(x); + } + System.out.println("--------------------------------"); + /** + * проверка доступа к файлу + */ + System.out.println("проверка доступа к файлу: " + dir); + System.out.println("Files.isReadable(dir) : " + Files.isReadable(dir)); + if (Files.isReadable(dir)){ + System.out.println("Files.getOwner : " + Files.getOwner(dir, LinkOption.NOFOLLOW_LINKS)); + System.out.println("Files.getFileStore(dir) : " + Files.getFileStore(dir)); + System.out.println("Files.size(dir) : " + Files.size(dir)); + System.out.println("Files.isSymbolicLink(dir) : " + Files.isSymbolicLink(dir)); + System.out.println("Files.probeContentType(dir) : " + Files.probeContentType(dir)); + + } + + } + +} diff --git a/target/classes/ru/molokoin/sourceListener/apache2/ApacheService.class b/target/classes/ru/molokoin/sourceListener/apache2/ApacheService.class new file mode 100644 index 0000000000000000000000000000000000000000..83886f6bb8f3d1e0a77d7f910b12f1186452eeeb GIT binary patch literal 3727 zcmb7H`F9i775<(rdt`ao3^;Zm;G~<4EsK!2i$!S(4h=@gE@BC`XgZb$d$6QYXGVbO z#@41GX`y>bmvl=>n=U|tuvzS$wx>NOKgsNIAl1`AEi0n^UHdjo4=1O6f7fcJ!=nMYNojn$&khcDr*zw@w); zT|q!#?MdyF7D;Q_iOA5{Nj>EVH10IAhOut}h8C7~)F!xqMbG7p-jGhkSZs%aTIgV9=+?FM|G zqgygy(Pnhu2?dYy)RMbps*3mF{Q^Nla#K*1l)Pi4BQ78JDdmIcRPdp)6dzSZ7q&65 zS^W%s+~BjrOMFy8Px)xY^Tqk;&UVj0`=&g z{^Vg>x9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