Package com.mucommander.commons.file.impl

Examples of com.mucommander.commons.file.impl.CachedFile


        // changes of size or date could potentially not be reflected when files are being processed but this should
        // not really present a risk.
        AbstractFile tempFile;
        for(int i=0; i<nbFiles; i++) {
            tempFile = files.elementAt(i);
            files.setElementAt((tempFile instanceof CachedFile)?tempFile:new CachedFile(tempFile, true), i);
        }

        if (this.baseSourceFolder!=null)
            this.baseSourceFolder = (getBaseSourceFolder() instanceof CachedFile)?getBaseSourceFolder():new CachedFile(getBaseSourceFolder(), true);

      this.jobProgress = new JobProgress(this);   
    }
View Full Code Here


     * @param children the current folder's children
     */
    synchronized void setCurrentFolder(AbstractFile folder, AbstractFile children[]) {
        int nbFiles = children.length;

        this.currentFolder = (folder instanceof CachedFile)?folder:new CachedFile(folder, true);

        this.parent = currentFolder.getParent();    // Note: the returned parent is a CachedFile instance
        if(parent!=null) {
            // Pre-fetch the attributes that are used by the table renderer and some actions.
            prefetchCachedFileAttributes(parent);
        }

        // Initialize file indexes and create CachedFile instances to speed up table display and navigation
        this.cachedFiles = children;
        this.fileArrayIndex = new int[nbFiles];
        AbstractFile file;
        for(int i=0; i<nbFiles; i++) {
            file = new CachedFile(children[i], true);

            // Pre-fetch the attributes that are used by the table renderer and some actions.
            prefetchCachedFileAttributes(file);

            cachedFiles[i] = file;
View Full Code Here

TOP

Related Classes of com.mucommander.commons.file.impl.CachedFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.