source: release-kits/wirk3/ant-scripts/tasks/antelope/src/ise/antelope/tasks/typedefs/file/IsDirectory.java@ 15023

Last change on this file since 15023 was 15023, checked in by oranfry, 16 years ago

did the bulk of the work on wirk3

File size: 503 bytes
Line 
1package ise.antelope.tasks.typedefs.file;
2
3import java.io.*;
4
5/**
6 * Copyright 2003
7 *
8 * @version $Revision: 1.1 $
9 */
10public class IsDirectory implements FileOp {
11
12 /**
13 * Checks if the given file is a directory
14 *
15 * @param f a file
16 * @return true if the file is a directory
17 */
18 public String execute(File f) {
19 if (f == null)
20 throw new IllegalArgumentException("file cannot be null");
21 return f.isDirectory() ? "true" : "false";
22 }
23}
24
25
Note: See TracBrowser for help on using the repository browser.