且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何以编程方式隐藏的SD卡文件夹中的android

更新时间:2023-02-10 23:29:31

使用这样的函数:

public static void hideFile(File file){
    File dstFile = new File(file.getParent(), "." + file.getName());
    file.renameTo(dstFile);
}

请注意我没有尝试在code,但它至少应该给你如何做到这一点的想法。

Please note I did not try the code, but it should at least give you the idea of how to do it.