eq - Equal to value
ne - Not Equal to value
ew - Ends with value
sw - Starts with value
ct - Contains value (substring)
re - Regular expression value matches
operator is one of the following for numeric values:
eq - Equal to value
ne - Not Equal to value
gt - Greater than value
ge - Greater than or equal value
lt - Less than value
le - Less than or equal value
Sigar sigar = new Sigar();
ProcessFinder find = new ProcessFinder(sigar);
long pid = find.findSingleProcess("Exe.Name.ct=explorer");
ProcMem memory = new ProcMem();
memory.gather(sigar, pid);
System.out.println(Long.toString(memory.getSize()));
폴더 리스트 가져오기 String path="C:\"; File dirFile=new File(path); File []fileList=dirFile.listFiles(); for(File tempFile : fileList) { if(tempFile.isFile()) { String tempPath=tempFile.getParent(); String tempFileName=tempFile.getName(); System.out.println("Path="+tempPath); System.out.println("FileName="+tempFileName); /*** Do something withd tempPath and temp FileName ^^; ***/ } } 정렬해서 가져오기 import java.io.FileFilter; import java.io.IOException; import java.util.Arrays; import java.util.Date; import org.apache.commons.io.comparator.LastModifiedFileComparator; import org.apache.commons.io.filefilter.FileFileFilter; public class LastModifiedFileComparatorTest { public static void main(String[] args) throws IOException { File directory = new File("."); // get just files, not directories File[] files = directory.listFiles((FileFilter) FileFileFilter.FILE); System.out.println("Defaul...
댓글
댓글 쓰기