Package java.io

Examples of java.io.FilenameFilter.accept()


            String fullName = getDisplayNameOf(item, psf, flags);
            File file = new File(fullName);
            String fName = file.getName();
            boolean res = true;
            if (!"".equals(fName)) {
                res = ff.accept(file.getParentFile(), fName);
            }           
            return (res ? 1 : 0);
        }
       
        private Win32.IShellFolder getIShellFolder(VoidPointer ptr) {
View Full Code Here


                }
            };
            // A directory's "." and ".." entries are not returned by
            // File.listFiles so we have to match / add them explicitly.
            if ((flags & INCLUDE_DOT_AND_DOTDOT) != 0) {
                if (filter.accept(current, ".")) {
                    matches.add(new File(current, "."));
                }
                if (filter.accept(current, "..")) {
                    matches.add(new File(current, ".."));
                }
View Full Code Here

            // File.listFiles so we have to match / add them explicitly.
            if ((flags & INCLUDE_DOT_AND_DOTDOT) != 0) {
                if (filter.accept(current, ".")) {
                    matches.add(new File(current, "."));
                }
                if (filter.accept(current, "..")) {
                    matches.add(new File(current, ".."));
                }
            }
            // Process the 'regular' directory contents
            for (File file : current.listFiles(filter)) {
View Full Code Here

    public boolean requiresWriteLock(String resourceName) {
        FilenameFilter unlocked = strategy.getUnlockedFilter();
        if (unlocked == null)
            return true;
        else
            return !unlocked.accept(null, resourceName);
    }

    public Object getLockTarget() {
        return new File(directory, strategy.getLockFilename());
    }
View Full Code Here

            for (int i = 0; i < files.length; i++)
            {
                FTPFile file = files[i];
                if (file.isFile())
                {
                    if (filenameFilter.accept(null, file.getName()))
                    {
                        if (connector.validateFile(file))
                        {
                            // only read the first one
                            return file;
View Full Code Here

        FilenameFilter filter = context.get(FilenameFilter.class);
        if (filter != null) {
            String name = metadata.get(Metadata.RESOURCE_NAME_KEY);
            if (name != null) {
                return filter.accept(ABSTRACT_PATH, name);
            }
        }

        return true;
    }
View Full Code Here

            String fullName = getDisplayNameOf(item, psf, flags);
            File file = new File(fullName);
            String fName = file.getName();
            boolean res = true;
            if (!"".equals(fName)) { //$NON-NLS-1$
                res = ff.accept(file.getParentFile(), fName);
            }           
            return (res ? 1 : 0);
        }
       
        private Win32.IShellFolder getIShellFolder(VoidPointer ptr) {
View Full Code Here

            String fullName = getDisplayNameOf(item, psf, flags);
            File file = new File(fullName);
            String fName = file.getName();
            boolean res = true;
            if (!"".equals(fName)) { //$NON-NLS-1$
                res = ff.accept(file.getParentFile(), fName);
            }           
            return (res ? 1 : 0);
        }
       
        private Win32.IShellFolder getIShellFolder(VoidPointer ptr) {
View Full Code Here

            String fullName = getDisplayNameOf(item, psf, flags);
            File file = new File(fullName);
            String fName = file.getName();
            boolean res = true;
            if (!"".equals(fName)) { //$NON-NLS-1$
                res = ff.accept(file.getParentFile(), fName);
            }           
            return (res ? 1 : 0);
        }
       
        private Win32.IShellFolder getIShellFolder(VoidPointer ptr) {
View Full Code Here

            for (int i = 0; i < files.length; i++)
            {
                FTPFile file = files[i];
                if (file.isFile())
                {
                    if (filenameFilter.accept(null, file.getName()))
                    {
                        if (connector.validateFile(file))
                        {
                            // only read the first one
                            return file;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.