ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martijn Kruithof ...@kruithof.xs4all.nl>
Subject Re: task FTP ... check file.isUnknown
Date Sat, 25 Mar 2006 22:42:40 GMT
Henrik Sorensen schreef:

>Hi List,
>
>Before starting to send patches, I would like some feedback on some of the 
>changes I have had to do inorder to correctly to receive files and 
>directories from a MVS server.
>A number of these changes could be added independently of the actual type of 
>server being used.
>
>
>the two functions
>
>isFunctioningAsFile 
>and
>isFunctioningAsDirectory
>
>is not taking into account that the file type can be unknown, so a check is 
>added:
>
>
>   private boolean isFunctioningAsDirectory(FTPClient ftp, String dir, FTPFile 
>file) {
>        boolean result = false;
>        String currentWorkingDir = null;
>        if (file.isDirectory()) {
>            return true;
>        } else if (file.isFile()) {
>            return false;
>        } else if (file.isUnknown()) {
>        	return false;
>        }
> ...
>}
>
>    private boolean isFunctioningAsFile(FTPClient ftp, String dir, FTPFile 
>file) {
>        if (file.isDirectory()) {
>            return false;
>        } else if (file.isFile()) {
>            return true;
>        } else if (file.isUnknown()) {
>        	return false;
>       }
>        
>        return !isFunctioningAsDirectory(ftp, dir, file);
>    }
>
>
>
>I am aware of different mailing lists have different ways of dealing with 
>discussions, but I intend to send a number of similar mails, for other 
>possible bugs in the FTP.java code, so please inform me if you would rather 
>prefer this to be done differently.
>
>Henrik
>
Please use bugzilla to report (possible) bugs and code enhancements. 
Please see

http://ant.apache.org/bugs.html

Martijn

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message