[Insight-developers] kwsys::SystemTools::FileIsDirectory()

Brad King brad . king at kitware . com
Thu, 3 Jul 2003 07:53:13 -0400 (EDT)


> Does the FileIsDirectory() call in kwsys::SystemTools work properly on
> linux?
>
> itkDICOMImageSeriesTest is failing on all the linux systems and the Mac.
> The failures on linux are all the same.  The ImageIOFactory cannot locate a
> factory for the "CVS" directory in the data directory.  There is a check in
> the DICOMImageSeriesFilenames code to skip subdirectories, so the "CVS"
> directory should have been excluded automatically.

What is the current working directory when the test is running?  I refer
to this logic in itkDICOMSeriesFileNames.cxx:

    // Only read files
    if (itksys::SystemTools::FileIsDirectory(dicomDir.GetFile(i)))
      {
      continue;
      }

    // store the full filename
    m_FileNames.push_back(m_Directory + "/" + dicomDir.GetFile(i));

The "IsDirectory" test is done on the file without a full path.

-Brad