重命名File

            File completeFile = new File(mFilePath + mFileName);
            if (completeFile.exists()) {
                File fileWithSuffix = new File(getLocalUrl());
                boolean rename = completeFile.renameTo(fileWithSuffix);
                Logger.d(TAG, "Download video success, and rename file!" + rename);
            }
原文地址:https://www.cnblogs.com/maxiaodoubao/p/4689363.html