Skip to content

Commit

Permalink
Add FileManager - Client (PrototypeFIles)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroFerrante committed Aug 1, 2024
1 parent 224e471 commit 9b83292
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Prototype/PrototypeFiles/FileManager.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Client

import java.util.ArrayList;
import java.util.List;

public class FileManager {

public static void main(String[] args) {
List<Files> files = List.of(
new FileC("fileC1.c", "20/luglio/2024", "1.1KB"),
new FileJava("fileJava1.java", "20/luglio/2024", "1.2KB")
);

List<Files> copyList = new ArrayList<>();
for (Files file : files)
copyList.add(file.clone());

copyList.forEach(System.out::println);

System.out.println("==========================================");

FileCache registry = new FileCache();
registry.put(files);
System.out.println(registry.get("DPPrototype"));
System.out.println(registry.get("fileC1.c"));
System.out.println(registry.get("fileJava1.java"));

}

}

0 comments on commit 9b83292

Please sign in to comment.