Ejemplo n.º 1
0
        // Used for creating the top drawer.
        public Drawer(String fullPath)
        {
            StorageRecord sr = new StorageRecord(true);

            this.isDrawer = true;
            this.name     = sr.getTopDrawerName();
            this.fullPath = fullPath;
            if (fullPath != null)
            {
                Directory.CreateDirectory(fullPath);
            }
        }
Ejemplo n.º 2
0
        // Main constructor
        public Files(Drawer parent, String name)
        {
            StorageRecord sr = new StorageRecord();

            this.isDrawer = false;
            this.name     = name;
            this.fullPath = parent.getFullPath() + "\\" + name;
            this.parent   = parent;
            if (this.fullPath != null && !File.Exists(fullPath))
            {
                File.Create(fullPath).Close();
                sr.getListOfItems().Add(this);
            }
        }
Ejemplo n.º 3
0
        // 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);
            }
        }
Ejemplo n.º 4
0
        public Drawer(Drawer parent, String name)
        {
            StorageRecord sr = new StorageRecord();

            this.isDrawer = true;
            this.name     = name;
            this.parent   = parent;
            this.fullPath = parent.getFullPath() + "\\" + name;
            if (fullPath != null && !Directory.Exists(fullPath))
            {
                Directory.CreateDirectory(fullPath);
                sr.getListOfItems().Add(this);
            }
        }
Ejemplo n.º 5
0
        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);
            }
        }