Ejemplo n.º 1
0
        /// <summary>
        /// Rename this Entry. ThIs operation will fail if:
        /// There Is a sibling Entry (i.e., an Entry whose parent Is the
        /// same as this Entry's parent) with the same name.
        /// ThIs Entry Is the root of the Entry tree. Its name Is dictated
        /// by the Filesystem and many not be Changed.
        /// </summary>
        /// <param name="newName">the new name for this Entry</param>
        /// <returns>
        /// true if the operation succeeded, else false
        /// </returns>
        public bool RenameTo(String newName)
        {
            bool rval = false;

            if (!IsRoot)
            {
                rval = _parent.ChangeName(Name, newName);
            }
            return(rval);
        }