Package jcifs.smb

Examples of jcifs.smb.SmbFile


                        try {
                            sb.setLength( 0 );
                            for( int k = 0; k < n; k++ ) {
                                sb.append( "    " );
                            }
                            SmbFile d = l[i];
                            System.err.println( sb.append( d ));
                            if( d.isDirectory() ) {
                                synchronized( dirList ) {
                                    dirList.add( new DirEntry( d, e.depth - 1 ));
                                    dirList.notify();
                                }
                            }
View Full Code Here


    }

    public static void main(String[] argv) throws Exception {
        int depth = Integer.parseInt( argv[1] );
        SmbCrawler sc = new SmbCrawler( depth );
        sc.traverse( new SmbFile( argv[0] ), depth );
    }
View Full Code Here

public class GetDfsPath {

    public static void main( String argv[] ) throws Exception {

        SmbFile f = new SmbFile( argv[0] );
        System.out.println( f.getDfsPath() );
    }
View Full Code Here

public class CopyTo {

    public static void main( String argv[] ) throws Exception {

        SmbFile from = new SmbFile( argv[0] );
        SmbFile to = new SmbFile( argv[1] );
        from.copyTo( to );
    }
View Full Code Here

            }
        }
    }

    void run( String url ) throws Exception {
        traverse( new SmbFile( url ), maxDepth );

        for (int p = 0; p < 16; p++) {
            int len = 15 - permissionNames[p].length();
            while( len > 0 ) {
                System.out.print( " " );
View Full Code Here

public class Append {

    public static void main( String argv[] ) throws Exception {

        SmbFile f = new SmbFile( argv[0] );
        SmbFileOutputStream out = new SmbFileOutputStream( f, true );

        byte[] msg;
        int i = 0;
        while( i++ < 3 ) {
View Full Code Here

    {
        if( argv.length < 1 ) {
            throw new IllegalArgumentException( "smb:// URL is required" );
        }

        SmbFile f = new SmbFile(argv[0]);

        System.out.println("  getPath: " + f.getPath());
        System.out.println("getParent: " + f.getParent());
    }
View Full Code Here

public class Exists {

    public static void main( String argv[] ) throws Exception {

        SmbFile f = new SmbFile( argv[0] );
        if( f.exists() ) {
            System.out.println( argv[0] + " exists" );
        } else {
            System.out.println( argv[0] + " does not exist" );
        }
    }
View Full Code Here

import jcifs.smb.SmbFile;

public class Mkdir {

    public static void main( String argv[] ) throws Exception {
        (new SmbFile( argv[0] )).mkdir();
    }
View Full Code Here

public class Put {

    public static void main( String argv[] ) throws Exception {

        SmbFile f = new SmbFile( argv[0] );
        FileInputStream in = new FileInputStream( f.getName() );
        SmbFileOutputStream out = new SmbFileOutputStream( f );

        long t0 = System.currentTimeMillis();

        byte[] b = new byte[8192];
View Full Code Here

TOP

Related Classes of jcifs.smb.SmbFile

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.