1 package org
.argeo
.cms
.gcr
.fs
;
3 import java
.nio
.file
.FileSystems
;
4 import java
.nio
.file
.Files
;
5 import java
.nio
.file
.Path
;
6 import java
.nio
.file
.Paths
;
8 import org
.argeo
.api
.gcr
.Content
;
9 import org
.argeo
.api
.gcr
.ContentSystemProvider
;
10 import org
.argeo
.api
.gcr
.ContentUtils
;
12 public class FsContentSession
implements ContentSystemProvider
{
13 private final Path rootPath
;
15 public FsContentSession(Path rootPath
) {
17 this.rootPath
= rootPath
;
21 public Content
get() {
22 return new FsContent(this, rootPath
);
25 public static void main(String
[] args
) {
26 Path path
= Paths
.get("/home/mbaudier/tmp");
27 System
.out
.println(FileSystems
.getDefault().supportedFileAttributeViews());
28 FsContentSession contentSession
= new FsContentSession(path
);
29 ContentUtils
.traverse(contentSession
.get(), (c
, d
) -> ContentUtils
.print(c
, System
.out
, d
, true));