Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-tm-dev] IFileService question

Hi, I have a question about the IFileService:

I wrote a method printdir (see below)

 private void printdir(
	IProgressMonitor monitor, IFileService fileService, String dirpath)
  {
    IHostFile[] folders = null;
    try
    {
      folders = fileService.getFolders(monitor, dirpath, null);
    }
    catch (SystemMessageException e2)
    {
      // TODO Auto-generated catch block
      e2.printStackTrace();
    }
    System.out.println("folder " + dirpath + " has " + folders.length + \
	" children");
    for (int i = 0; i < folders.length; i++)
    {
      System.out.println("folders[i].getName() = " + folders[i].getName());
    }
  }

and use it like this:

        IFileService fileService = ... // obtain IFileService

        printdir(monitor, fileService, "/tmp/kde-lothar");
        printdir(monitor, fileService, "/tmp");

The output I get is:
folder /tmp/kde-lothar has 0 children
folder /tmp has 8 children
folders[i].getName() = .X11-unix
folders[i].getName() = 0380726986
folders[i].getName() = .ICE-unix
folders[i].getName() = ssh-yxASld4865
folders[i].getName() = kde-lothar
folders[i].getName() = ksocket-lothar
folders[i].getName() = lothar_New_configuration
folders[i].getName() = hsperfdata_lothar

here's a ls in a local shell

lothar@janus$ ls -1 /tmp/kde-lothar
konqueror-crash-i7Perb.log
konqueror-crash-UyGWQa.log
konquerorsIaY2b.swf.part
ksycoca
us..xkm
lothar@janus$ ls -1 /tmp
0380726986
hsperfdata_lothar
kde-lothar
ksocket-lothar
lothar_New_configuration
ssh-yxASld4865

Why do I not see the content of  /tmp/kde-lothar with my printdir? I can see 
the content in the RSE explorer. Am I doing something wrong? If so - what?
I am using a SSH connection.

Any help highly appreciated!

Lothar
-- 
Lothar Werzinger Dipl.-Ing. Univ.
framework & platform architect
Tradescape Inc.
111 West St. John Street, Suite 200
San Jose, Ca 95113
email: lothar@xxxxxxxxxxxxxx
web: http://www.tradescape.biz


Back to the top