示例#1
0
        private static Int32 Rename(
            IntPtr FileSystemPtr,
            ref FullContext FullContext,
            String FileName,
            String NewFileName,
            Boolean ReplaceIfExists)
        {
            FileSystemBase FileSystem = (FileSystemBase)Api.GetUserContext(FileSystemPtr);

            try
            {
                Object FileNode, FileDesc;
                Api.GetFullContext(ref FullContext, out FileNode, out FileDesc);
                return(FileSystem.Rename(
                           FileNode,
                           FileDesc,
                           FileName,
                           NewFileName,
                           ReplaceIfExists));
            }
            catch (Exception ex)
            {
                return(ExceptionHandler(FileSystem, ex));
            }
        }