Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

C/C++ API Documentation | 2025.1

# ClientUser::File( FileSysType )

Create a `FileSys` object for reading and writing files in the client workspace.

Virtual? | Yes |
Class | `ClientUser` |
Arguments | `FileSysType type` | the file type of the file to be created
Returns | `FileSys *` | a pointer to the new `FileSys`.

## Notes

This method is a wrapper for `FileSys::Create()`.

## Example

`ClientUser::File()` is generally called whenever it’s necessary to manipulate files in the client workspace. For example, a `p4 sync`, `p4 edit`, or `p4 revert` makes one call to `File()` for each workspace file with which the command interacts.

An alternate implementation might return a subclass of `FileSys`. For example, if you have defined a class `MyFileSys` and want your `MyClientUser` class to use members of this class rather than the base `FileSys`, reimplement `File()` to return a `MyFileSys` instead:

    FileSys * MyClientUser::File( FileSysType type )
    {
        return MyFileSys::Create( type );
    }

Your search for returned results