commit | author | age
|
e369b9
|
1 |
/* |
c45b52
|
2 |
fm - File management class library |
e369b9
|
3 |
Copyright (C) 2024 Ulrich Hilger |
U |
4 |
|
|
5 |
This program is free software: you can redistribute it and/or modify |
|
6 |
it under the terms of the GNU Affero General Public License as |
|
7 |
published by the Free Software Foundation, either version 3 of the |
|
8 |
License, or (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 Affero General Public License for more details. |
|
14 |
|
|
15 |
You should have received a copy of the GNU Affero General Public License |
|
16 |
along with this program. If not, see <https://www.gnu.org/licenses/>. |
|
17 |
*/ |
|
18 |
package de.uhilger.fm; |
|
19 |
|
|
20 |
import java.util.List; |
|
21 |
|
|
22 |
/** |
|
23 |
* Einfache Transportklasse fuer eine Verzeichnisliste |
|
24 |
* |
|
25 |
* @author Ulrich Hilger, 15. Januar 2024 |
|
26 |
*/ |
|
27 |
public class DirList { |
8bde6f
|
28 |
private String dir; |
U |
29 |
private List<FileRef> dateien; |
e369b9
|
30 |
|
ae2c69
|
31 |
/** |
U |
32 |
* Name und Pfad des Ordners ermitteln |
|
33 |
* |
|
34 |
* @return Name des Ordners |
|
35 |
*/ |
8bde6f
|
36 |
public String getDirectory() { |
U |
37 |
return dir; |
e369b9
|
38 |
} |
U |
39 |
|
ae2c69
|
40 |
/** |
U |
41 |
* Name und Pfad des Ordners angeben |
|
42 |
* |
|
43 |
* @param path Name des Ordners |
|
44 |
*/ |
8bde6f
|
45 |
public void setDirectory(String path) { |
U |
46 |
this.dir = path; |
e369b9
|
47 |
} |
U |
48 |
|
ae2c69
|
49 |
/** |
U |
50 |
* Die Liste mit Dateien und Ordnern ermitteln, die in |
|
51 |
* diesem Ordner enthalten sind |
|
52 |
* |
|
53 |
* @return Liste mit Dateien und Ordnern, die in |
|
54 |
* diesem Ordner enthalten sind |
|
55 |
*/ |
8bde6f
|
56 |
public List<FileRef> getFiles() { |
e369b9
|
57 |
return dateien; |
U |
58 |
} |
|
59 |
|
ae2c69
|
60 |
/** |
U |
61 |
* Die Liste mit Dateien und Ordnern angeben, die in |
|
62 |
* diesem Ordner enthalten sind |
|
63 |
* |
|
64 |
* @param files Liste mit Dateien und Ordnern, die in |
|
65 |
* diesem Ordner enthalten sind |
|
66 |
*/ |
8bde6f
|
67 |
public void setFiles(List<FileRef> files) { |
U |
68 |
this.dateien = files; |
e369b9
|
69 |
} |
U |
70 |
|
|
71 |
|
|
72 |
} |