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