Package org.drools.compiler.io

Examples of org.drools.compiler.io.Folder


   
    public File getFile(String path) {  
        path = MemoryFolder.trimLeadingAndTrailing( path );
        int lastSlashPos = path.lastIndexOf( '/' );
        if ( lastSlashPos >= 0 ) {
            Folder folder = getFolder( path.substring( 0,
                                                       lastSlashPos ) );
            String name = path.substring( lastSlashPos + 1 );
            return new MemoryFile( this,
                                   name,
                                   folder );
        } else {
            // path is already at root
            Folder folder = getRootFolder();
            return new MemoryFile( this,
                                   path,
                                   folder );
        }
View Full Code Here


            }
           
            folders.put( folder.getPath().toPortableString(),
                         new HashSet<Resource>() );

            Folder parent = folder.getParent();
            folders.get( parent.getPath().toPortableString() ).add( folder );
        }
    }
View Full Code Here

                int separator = entry.getName().lastIndexOf( '/' );
                String path = entry.getName().substring( 0,
                                                         separator );
                String name = entry.getName().substring( separator + 1 );

                Folder folder = mfs.getFolder( path );
                folder.create();

                File file = folder.getFile( name );
                file.create( zipFile.getInputStream( entry ) );
            }
        } catch ( IOException e ) {
            throw new RuntimeException( e );
        } finally {
View Full Code Here

   
    public File getFile(String path) {  
        path = MemoryFolder.trimLeadingAndTrailing( path );
        int lastSlashPos = path.lastIndexOf( '/' );
        if ( lastSlashPos >= 0 ) {
            Folder folder = getFolder( path.substring( 0,
                                                       lastSlashPos ) );
            String name = path.substring( lastSlashPos + 1 );
            return new MemoryFile( this,
                                   name,
                                   folder );
        } else {
            // path is already at root
            Folder folder = getRootFolder();
            return new MemoryFile( this,
                                   path,
                                   folder );
        }
View Full Code Here

            }
           
            folders.put( folder.getPath().toPortableString(),
                         new HashSet<Resource>() );

            Folder parent = folder.getParent();
            folders.get( parent.getPath().toPortableString() ).add( folder );
        }
    }
View Full Code Here

                int separator = entry.getName().lastIndexOf( '/' );
                String path = entry.getName().substring( 0,
                                                         separator );
                String name = entry.getName().substring( separator + 1 );

                Folder folder = mfs.getFolder( path );
                folder.create();

                File file = folder.getFile( name );
                file.create( zipFile.getInputStream( entry ) );
            }
        } catch ( IOException e ) {
            throw new RuntimeException( e );
        } finally {
View Full Code Here

TOP

Related Classes of org.drools.compiler.io.Folder

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.