ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael B. Allen" <mbal...@erols.com>
Subject RE: Chmod Ant Workn' :)
Date Mon, 04 Sep 2000 07:07:00 GMT
Yup, Delete does the equivalent to the below. Sorry, I don't know much
about patches and cvs and the like but this should be pretty trivial to
commit.

        for (int i = 0; i < files.length; i++) {
            File f = new File(srcDir, files[i]);
            if(f.exists()) {
                chmod(f.toString());
            }
        }

Thanks,
Mike
Michael_B_Allen@ml.com
http://jcifs.samba.org



> -----Original Message-----
> From: Michael B. Allen [mailto:mballen@erols.com]
> Sent: Monday, September 04, 2000 2:50 AM
> To: ant-dev@jakarta.apache.org
> Subject: RE: Chmod Ant Workn' :)
>
>
> Thanks,
>
> Thanks,
>
> Are you supposed to prepend the srcDir to the files returned by the
> directory scanner? The problem is the files[i] are not absolute paths.
>
>     public void execute() throws BuildException {
>         try {
> <snip>
>                 } else if(srcFile == null && srcDir != null)
>
>
>                     DirectoryScanner ds = getDirectoryScanner(srcDir);
>                     String[] files = ds.getIncludedFiles();
>
>                     for (int i = 0; i < files.length; i++) {
> System.out.println( "chmod on " + files[i] );
>                         chmod(files[i]);
>                     }
>                 }
>             }
>         } catch (IOException ioe) {


Mime
View raw message