在Android中将视频从一个位置复制到另一个位置

时间:2012-07-07 08:54:13

标签: android

我遇到了一个问题,我想在android中的sdcard内将视频从一个位置复制/移动到另一个位置。 有谁知道怎么做。

1 个答案:

答案 0 :(得分:0)

private String CopyFile(String srcPath,String destPath)
{
    String videoFileName = VIDEO_FILE_PREFIX + mCurrentQuestion.getQuestionId() + VIDEO_FILE_SUFFIX ;
    File source= new File(srcPath);
    File destination= new File(destPath+"/"+videoFileName);
    source.renameTo(destination);


    return destPath+"/"+videoFileName;
}