// Contrustor for when there is no parent. public Files(String name, String fullPath) { StorageRecord sr = new StorageRecord(); this.isDrawer = false; this.name = name; this.fullPath = fullPath; this.parent = sr.getTopDrawer(); if (this.fullPath != null && !File.Exists(fullPath)) { File.Create(fullPath).Close(); sr.getListOfItems().Add(this); } }
public Drawer(String name, String fullPath) { StorageRecord sr = new StorageRecord(); this.isDrawer = true; this.parent = sr.getTopDrawer(); this.name = name; this.fullPath = fullPath; if (fullPath != null && !Directory.Exists(fullPath)) { Directory.CreateDirectory(fullPath); sr.getListOfItems().Add(this); } }