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

            while (!(mf is MyRootFolder))
            {
                mf = mf.UpperFolder;
            }
            return(((MyRootFolder)mf).Disk);
        }
예제 #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());
        }
예제 #3
0
 /// <summary>
 /// Create file that is inside <paramref name="f"/>
 /// </summary>
 public MyFile(MyFolder f)
 {
     Folder = f;
 }