Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

allensoft.javacvs.client
Class CVSIgnoreFile  view CVSIgnoreFile download CVSIgnoreFile.java

java.lang.Object
  extended byallensoft.io.PatternBasedFileFilter
      extended byallensoft.javacvs.client.CVSIgnoreFile
All Implemented Interfaces:
java.io.FileFilter

public class CVSIgnoreFile
extends allensoft.io.PatternBasedFileFilter

Defines a pattern based file filter whose patterns are taken from a file. The patterns are separated by white space. Typically, these will be .cvsignore files in the user's home directory or directories being recursed by an import or add command. The file is automatically reparsed when it is modified externally. The patterns in this filter reqpresent the patterns in the file. Note that this filter accepts files only if a pattern does not match the file. This is because the patterns specify files to be ignored.


Field Summary
private static java.util.Map g_IgnoreFiles
          Cache of already loaded files.
private  java.io.File m_File
           
private  long m_nLastModified
           
 
Fields inherited from class allensoft.io.PatternBasedFileFilter
 
Constructor Summary
private CVSIgnoreFile(java.io.File file)
           
 
Method Summary
 boolean accept(java.io.File file)
          This method determines whether or not a given pathname should be included in a pathname listing.
 void addPattern(java.lang.String sPattern)
           
 void addPattern(java.lang.String[] patterns)
           
static CVSIgnoreFile getCVSIgnoreFile(java.io.File file)
           
 java.io.File getFile()
           
private  void loadPatterns()
           
 void removeAllPatterns()
           
 void removePattern(java.lang.String sPattern)
           
private  void savePatterns()
           
 
Methods inherited from class allensoft.io.PatternBasedFileFilter
addPatterns, getPattern, getPatternCount, removePattern, setPattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_File

private java.io.File m_File

m_nLastModified

private long m_nLastModified

g_IgnoreFiles

private static java.util.Map g_IgnoreFiles
Cache of already loaded files. Maps File to CVSIgnoreFile.

Constructor Detail

CVSIgnoreFile

private CVSIgnoreFile(java.io.File file)
Method Detail

getCVSIgnoreFile

public static CVSIgnoreFile getCVSIgnoreFile(java.io.File file)

accept

public boolean accept(java.io.File file)
Description copied from interface: java.io.FileFilter
This method determines whether or not a given pathname should be included in a pathname listing.


removePattern

public void removePattern(java.lang.String sPattern)

removeAllPatterns

public void removeAllPatterns()

addPattern

public void addPattern(java.lang.String sPattern)

addPattern

public void addPattern(java.lang.String[] patterns)

getFile

public java.io.File getFile()

loadPatterns

private void loadPatterns()

savePatterns

private void savePatterns()