KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > indexing > Log


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.internal.indexing;
12
13 import java.io.*;
14
15 class Log {
16
17     /**
18      * Deletes the transaction log from the file system.
19      */

20     static void delete(String JavaDoc storeName) {
21         new File(name(storeName)).delete();
22     }
23
24     /**
25      * Returns true iff the transaction log exists in the file system.
26      */

27     static boolean exists(String JavaDoc storeName) {
28         return new File(name(storeName)).exists();
29     }
30
31     /**
32      * Returns the name of the log file, given the store name.
33      */

34     static String JavaDoc name(String JavaDoc storeName) {
35         return storeName + ".log"; //$NON-NLS-1$
36
}
37 }
38
Popular Tags