Exemple #1
0
        internal MyDisk GetDisk()
        {
            MyFolder mf = this;

            while (!(mf is MyRootFolder))
            {
                mf = mf.UpperFolder;
            }
            return(((MyRootFolder)mf).Disk);
        }
Exemple #2
0
        /// <summary>
        /// Return full path of folder.
        /// </summary>
        /// <returns></returns>
        public virtual string GetPath()
        {
            StringBuilder sb = new StringBuilder();
            MyFolder      mf = this;

            while (mf != null)
            {
                sb.Insert(0, mf.Path);
                mf = mf.UpperFolder;
            }
            return(sb.ToString());
        }
 /// <summary>
 /// Create file that is inside <paramref name="f"/>
 /// </summary>
 public MyFile(MyFolder f)
 {
     Folder = f;
 }