示例#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;
 }