⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 loadupdatehandler.java

📁 很棒的web服务器源代码
💻 JAVA
字号:
// LoadUpdateHandler.java// $Id: LoadUpdateHandler.java,v 1.4 2000/08/16 21:37:26 ylafon Exp $  // (c) COPYRIGHT MIT and INRIA, 1997.// Please first read the full copyright statement in file COPYRIGHT.htmlpackage org.w3c.cvs;import java.io.File;import java.io.FilenameFilter;class LoadUpdateHandler extends UpdateHandler implements CVS {    CvsDirectory cvs     = null;    String       files[] = null;    long         stamp   = -1;    void notifyEnd() {	// All remaining files in directory are in sync with rep:	for (int i = 0 ; i < files.length ; i++) {	    if ( files[i] != null ) 		cvs.createFileEntry(stamp, files[i], FILE_OK);	}    }    void notifyEntry(String filename, int status) {	// We're only interested in knowing about files here:	File file = new File(cvs.getDirectory(), filename);	if ( file.isDirectory() )	    return;	// We are not really performing the update, so...	if ( status == FILE_OK ) 	    status = file.exists() ? FILE_U : FILE_NCO;	// Add an entry for the file:	cvs.createFileEntry(stamp, filename, status);	// Remove the file from the directory listing (it's handled now)	for (int i = 0 ; i < files.length ; i++) {	    if ( files[i] == null )		continue;	    if ( files[i].equals(filename) ) {		files[i] = null;		return;	    }	}    }    LoadUpdateHandler(CvsDirectory cvs) {	this.cvs   = cvs;	this.files = cvs.getDirectory().list(new FileFilter());	this.stamp = System.currentTimeMillis();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -