Package jcifs.smb

Examples of jcifs.smb.SmbFile.list()

@return A String[] array of files and directories,workgroups, servers, or shares depending on the context of the resource URL

        //NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("domain", "username", "password");
        SmbFileInputStream in;
        try {
            SmbFile sf = new SmbFile(args[0]);
            if (sf.isDirectory()) {
                String[] s = sf.list();
                for (String t: s) System.out.println(t);
            } else {
                in = new SmbFileInputStream(sf);
                byte[] b = new byte[8192];
                int n;
View Full Code Here


    private void cleanSmbDir(String dir) throws Exception
    {
        dir = toSMB(dir);

        SmbFile f2 = new SmbFile(dir, getAuth());
        String[] tmp = f2.list();

        if(tmp == null)
        {
            return;
        }
View Full Code Here

                tmp = tmp + "/";
            }

            //Log.debug("tmp: " + tmp);
            SmbFile f = new SmbFile(tmp, getAuth());
            f.list();

            pwd = tmp;

            //Log.debug("pwd: " + pwd);
            //System.out.println("chdir: " + getPWD());
View Full Code Here

            fileCount = 0;
            shortProgress = true;
            baseFile = StringUtils.getDir(dir);

            SmbFile f2 = new SmbFile(dir, getAuth());
            String[] tmp = f2.list();

            if(tmp == null)
            {
                return;
            }
View Full Code Here

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

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

        long t1 = System.currentTimeMillis();
        String[] files = file.list();
        long t2 = System.currentTimeMillis() - t1;

        for( int i = 0; i < files.length; i++ ) {
            System.out.print( " " + files[i] );
        }
View Full Code Here

        }
        System.out.println( types[type] );
        System.out.println();

        long t1 = System.currentTimeMillis();
        String[] files = file.list();
        long t2 = System.currentTimeMillis() - t1;

        for( int i = 0; i < files.length; i++ ) {
            System.out.print( " " + files[i] );
        }
View Full Code Here

        //NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("domain", "username", "password");
        SmbFileInputStream in;
        try {
            SmbFile sf = new SmbFile(args[0]);
            if (sf.isDirectory()) {
                String[] s = sf.list();
                for (String t: s) System.out.println(t);
            } else {
                in = new SmbFileInputStream(sf);
                byte[] b = new byte[8192];
                int n;
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.