## org.apache.tools.ant.taskdefs.optional.perforce
Class P4Fstat

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.Task
              org.apache.tools.ant.taskdefs.optional.perforce.P4Base
                  org.apache.tools.ant.taskdefs.optional.perforce.P4Fstat

All Implemented Interfaces:
  java.lang.Cloneable

    public class P4Fstat

extends P4Base

P4Fstat--find out which files are under Perforce control and which are not.
Example Usage:

     <project name="p4fstat" default="p4fstat"
     basedir="C:\dev\gnu">
         <target name="p4fstat" >
             <p4fstat showfilter="all">
                 <fileset dir="depot" includes="**\/*"/>
             </p4fstat>
         </target>
     </project>

Field Summary

Fields inherited from class org.apache.tools.ant.taskdefs.optional.perforce.P4Base
`failOnError, P4Client, P4CmdOpts, P4Opts, P4Port, P4User, P4View, shell, util`

Fields inherited from class org.apache.tools.ant.Task
`target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`description, location, project`

Constructor Summary
`P4Fstat()`

Method Summary
`void` `addFileset(FileSet set)` Adds a fileset to be examined by p4fstat.
`void` `execute()` Executes the p4fstat task.
`int` `getLengthOfTask()` Return the number of files seen.
`void` `setChangelist(int changelist)` Sets optionally a change list number.
`void` `setShowFilter(java.lang.String filter)` Sets the filter that one wants applied.

Methods inherited from class org.apache.tools.ant.taskdefs.optional.perforce.P4Base
`execP4Command, execP4Command, getErrorMessage, getInError, init, setClient, setCmdopts, setErrorMessage, setFailonerror, setGlobalopts, setInError, setPort, setUser, setView`

Methods inherited from class org.apache.tools.ant.Task
`bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### P4Fstat

    public P4Fstat()

Method Detail

### setShowFilter

    public void setShowFilter(java.lang.String filter)

  Sets the filter that one wants applied.

  Option | Meaning
  --- | ---
  all | all files under Perforce control or not
  existing | only files under Perforce control
  non-existing | only files not under Perforce control or not

  Parameters:
    `filter` - should be one of all|existing|non-existing.

### setChangelist

    public void setChangelist(int changelist)
                       throws BuildException

  Sets optionally a change list number.

  Parameters:
    `changelist` - change list that one wants information about.
  Throws:
    `BuildException` - if the change list number is negative.

### addFileset

    public void addFileset(FileSet set)

  Adds a fileset to be examined by p4fstat.

  Parameters:
    `set` - the fileset to add.

### execute

    public void execute()
                 throws BuildException

  Executes the p4fstat task.

  Overrides:
    `execute` in class `Task`
  Throws:
    `BuildException` - if no files are specified.

### getLengthOfTask

    public int getLengthOfTask()

  Return the number of files seen.

  Returns:
    the number of files seen.