예제 #1
0
        /// <summary>Rename the given snapshot</summary>
        /// <param name="oldSnapshotName">Old name of the snapshot</param>
        /// <param name="newSnapshotName">New name of the snapshot</param>
        /// <exception cref="System.IO.IOException">
        /// Throw IOException when 1) the given path does not lead to an
        /// existing snapshottable directory, and/or 2) the snapshot with the
        /// old name does not exist for the directory, and/or 3) there exists
        /// a snapshot with the new name for the directory
        /// </exception>
        public virtual void RenameSnapshot(INodesInPath iip, string snapshotRoot, string
                                           oldSnapshotName, string newSnapshotName)
        {
            INodeDirectory srcRoot = GetSnapshottableRoot(iip);

            srcRoot.RenameSnapshot(snapshotRoot, oldSnapshotName, newSnapshotName);
        }