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

C/C++ API Documentation | 2025.1

# FileSys::Set( const StrPtr * )

Initializes the protected `StrBuf` variable `path` to the supplied filename argument; this `path` is used by other `FileSys` member functions when reading and writing to a physical file location.

Virtual? | Yes |
Class | `FileSys` |
Arguments | `const StrPtr *name` | filename for this `FileSys` object
Returns | `void` |

## Notes

After creating a `FileSys` object, call `Set()` to supply it with a `path`.

## Example

To use `Set()` to set a filename:

    FileSys *f = FileSys::Create( FST_BINARY );
    f->Set( "/tmp/file.bin" );

To reimplement `Set()` to provide debugging output:

Copy

    void FileSysDemo::Set( const StrPtr &amp;name )
    {
        // Set must initialize the protected variable "path"
        // with the filename argument "name".

        path.Set( name );

        if ( DEBUG )
            printf( "debug (Set): %s\n", path.Text() );
    }

Your search for returned results