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:

void FileSysDemo::Set( const StrPtr &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() );
}