FileManager.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:Breakpoint 作者:
public static void saveWikiBook()
{
    String path = "plugins/Breakpoint/wikiBook/";
    BookMeta im = (BookMeta) InventoryMenuManager.wikiBook.getItemMeta();
    List<String> contents = im.getPages();
    for (int page = 0; page < contents.size(); page++)
    {
        File file = new File(path + page + ".txt");
        File pathFile = new File(path);
        pathFile.mkdirs();
        try
        {
            if (!file.exists())
                file.createNewFile();
            setString(file, contents.get(page));
        }
        catch (IOException e)
        {
            Breakpoint.warn("Wiki book did not save properly.");
            e.printStackTrace();
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号