当前位置: 首页>>代码示例>>Java>>正文


Java FileUtils.deleteRecursively方法代码示例

本文整理汇总了Java中org.neo4j.kernel.impl.util.FileUtils.deleteRecursively方法的典型用法代码示例。如果您正苦于以下问题:Java FileUtils.deleteRecursively方法的具体用法?Java FileUtils.deleteRecursively怎么用?Java FileUtils.deleteRecursively使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.neo4j.kernel.impl.util.FileUtils的用法示例。


在下文中一共展示了FileUtils.deleteRecursively方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: clearDb

import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
public void clearDb() {
    long start = System.currentTimeMillis();
    maxNG = 0;
    try {
        if (wroteToDB) {
            FileUtils.deleteRecursively(new File(storeDir));
            wroteToDB = false;
        }
        if (tempStorageMatrix != null) {
            tempStorageMatrix.clearAll();
        }
        this.coveredRows.clear();
        NGLimit = Double.MAX_VALUE;
        timeSpentClearingDB.addAndGet(System.currentTimeMillis() - start);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
}
 
开发者ID:sapirgolan,项目名称:MFIBlocking,代码行数:19,代码来源:GDS_NG.java

示例2: clearDb

import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
public void clearDb() {
	long start = System.currentTimeMillis();
	maxNG = 0;
	try {
		if(wroteToDB){
			FileUtils.deleteRecursively(new File(storeDir));
			wroteToDB = false;
		}
		if (tempStorageMatrix != null) {
			tempStorageMatrix.clearAll();
		}
		this.coveredRows.clear();			
		NGLimit = Double.MAX_VALUE;
		timeSpentClearingDB.addAndGet(System.currentTimeMillis() - start);
	} catch (IOException e) {
		throw new RuntimeException(e);
	}
}
 
开发者ID:sapirgolan,项目名称:MFIBlocking,代码行数:19,代码来源:GDS_NG.java

示例3: ClearDatabase

import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
/**
 * Clears all data in the DB and reconnects to it afterwards.
 */
public void ClearDatabase(){
	// Shutdown database before erasing it
	log.debug("Shutting down the database");
	mGraphDb.shutdown();
	try
       {
		log.debug("Erasing the database files");
           FileUtils.deleteRecursively( new File( mDbPath ) );
       }
       catch ( IOException e )
       {
           throw new RuntimeException( e );
       }
	// Restart database
	log.debug("Reconnecting to database");
	mGraphDb = new GraphDatabaseFactory().
			newEmbeddedDatabaseBuilder(mDbPath).
			setConfig( GraphDatabaseSettings.node_keys_indexable, KEY_HASH ).
			setConfig( GraphDatabaseSettings.node_auto_indexing, "true" ).
			newGraphDatabase();
	registerShutdownHook(mGraphDb);
}
 
开发者ID:trustathsh,项目名称:visitmeta,代码行数:26,代码来源:Neo4JConnection.java

示例4: clearDb

import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
public static void clearDb() {
	try {
		FileUtils.deleteRecursively(new File(dbURL));
	} catch (IOException e) {
		throw new RuntimeException(e);
	}
}
 
开发者ID:tchico,项目名称:dgMaster-trunk,代码行数:8,代码来源:EntityEventNodeNeo4j.java

示例5: createEmbeddedDB

import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
private void createEmbeddedDB() {
    storeDir = RECORD_DB_DIR + "gds" + runningNum;
    try {
        FileUtils.deleteRecursively(new File(storeDir));
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    runningNum++;
    GDS = new EmbeddedGraphDatabase(storeDir);
    registerShutdownHook(GDS);
}
 
开发者ID:sapirgolan,项目名称:MFIBlocking,代码行数:13,代码来源:GDS_NG.java

示例6: clearRecordDb

import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
private static void clearRecordDb() {
	try {
		FileUtils.deleteRecursively(new File(RECORD_DB_PATH));
	} catch (IOException e) {
		throw new RuntimeException(e);
	}
}
 
开发者ID:sapirgolan,项目名称:MFIBlocking,代码行数:8,代码来源:Utilities.java

示例7: createEmbeddedDB

import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
private void createEmbeddedDB(){
	storeDir = RECORD_DB_DIR + "gds" + runningNum;		
	try {
		FileUtils.deleteRecursively(new File(storeDir));
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	runningNum++;
	GDS = new EmbeddedGraphDatabase(storeDir);
	registerShutdownHook(GDS);
}
 
开发者ID:sapirgolan,项目名称:MFIBlocking,代码行数:13,代码来源:GDS_NG.java

示例8: shutdown

import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
public static void shutdown() {
    graphDB.shutdown();
    try {
        if(doShutdown) FileUtils.deleteRecursively(new File(dbPath));
    } catch (IOException e) {
        e.printStackTrace();
    }

}
 
开发者ID:ISA-tools,项目名称:Automacron,代码行数:10,代码来源:Neo4JConnector.java


注:本文中的org.neo4j.kernel.impl.util.FileUtils.deleteRecursively方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。