Package jcifs.smb

Examples of jcifs.smb.SmbFile.listFiles()

@return An array of SmbFile objects representing fileand directories, workgroups, servers, or shares depending on the context of the resource URL

public class SmbTimeout {

    public static void jcifsScan(String root, int sleepTime) throws Exception {
        long start = System.currentTimeMillis();
        SmbFile smbRoot = new SmbFile(root);
        SmbFile[] files = smbRoot.listFiles();
        for(SmbFile f : files) {
            System.out.println( f + ": " + f.canRead()+" : "+ f.length() + ": " + (System.currentTimeMillis()-start));
        Thread.sleep(sleepTime);
        }
    }
View Full Code Here


        int count = Integer.parseInt(argv[1]);

        for ( ;; ) {
            try {
                SmbFile f = new SmbFile(argv[0]);
                SmbFile[] list = f.listFiles();
                System.out.println("Successfully listed resource: " + list.length);
            } catch (SmbException se) {
                se.printStackTrace();
            }
View Full Code Here

        Semaphore sem = new Semaphore( numThreads );
        SmbFile[] l = null;
        int i = 0;

        try {
            l = top.listFiles();
            depth--;
            for( i = 0; i < l.length; i++ ) {
                try {
                    System.out.println( l[i] );
                    if( !l[i].isDirectory() || l[i].isHidden() ) {
View Full Code Here

            file = new SmbFile( argv[a] );

            long t1 = System.currentTimeMillis();
            try {
                files = file.listFiles();
            } catch (Exception e) {
                e.printStackTrace();
            }
            long t2 = System.currentTimeMillis() - t1;
View Full Code Here

    // add DFS support
    SmbFile[] children = null;
    try
    {
      currentDirectory.connect();
      children = currentDirectory.listFiles(new DirectoryFilter());
    }
    catch (SmbException se)
    {
      try
      {
View Full Code Here

    // add DFS support
    SmbFile[] children = null;
    try
    {
      currentDirectory.connect();
      children = currentDirectory.listFiles(new DirectoryFilter());
    }
    catch (SmbException se)
    {
      try
      {
View Full Code Here

    // add DFS support
    SmbFile[] children = null;
    try
    {
      currentDirectory.connect();
      children = currentDirectory.listFiles(new DirectoryFilter());
    }
    catch (SmbException se)
    {
      try
      {
View Full Code Here

    // add DFS support
    SmbFile[] children = null;
    try
    {
      currentDirectory.connect();
      children = currentDirectory.listFiles(new DirectoryFilter());
    }
    catch (SmbException se)
    {
      try
      {
View Full Code Here

    // add DFS support
    SmbFile[] children = null;
    try
    {
      currentDirectory.connect();
      children = currentDirectory.listFiles(new DirectoryFilter());
    }
    catch (SmbException se)
    {
      try
      {
View Full Code Here

    // add DFS support
    SmbFile[] children = null;
    try
    {
      currentDirectory.connect();
      children = currentDirectory.listFiles(new DirectoryFilter());
    }
    catch (SmbException se)
    {
      try
      {
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.