1 28 29 package com.caucho.vfs; 30 31 import com.caucho.loader.EnvironmentLocal; 32 33 import javax.annotation.PostConstruct; 34 import java.io.File ; 35 36 39 public class CaseInsensitive { 40 private final static EnvironmentLocal<Boolean > _caseInsensitive = 41 new EnvironmentLocal<Boolean >("caucho.vfs.case-insensitive"); 42 43 private boolean _isCaseInsensitive = true; 44 45 public CaseInsensitive() 46 { 47 } 48 49 52 public static boolean isCaseInsensitive() 53 { 54 Boolean value = _caseInsensitive.get(); 55 56 if (value == null) 57 return File.separatorChar == '\\'; 58 else 59 return value.booleanValue(); 60 } 61 62 65 public void setValue(boolean isInsensitive) 66 { 67 _isCaseInsensitive = isInsensitive; 68 } 69 70 73 @PostConstruct 74 public void init() 75 { 76 _caseInsensitive.set(new Boolean (_isCaseInsensitive)); 77 } 78 } 79 | Popular Tags |