tfFSGetUniqueFileName

Jump to: navigation, search

Table of Contents >> Application Reference >> File System Interface


#include <trsocket.h>


int tfFSGetUniqueFileName (
void * userDataPtr,
char * bufferPtr,
int bufferSize
);


Function Description

Given the unique user data pointer as returned by tfFSUserLogin(), this function finds and copies a unique file name that does not conflict with any existing file names in the user's working directory in the buffer pointed to by 'bufferPtr' (up to 'bufferSize' bytes).


Parameters

  • userDataPtr
    Pointer to user data structure as returned by tfFSUserLogin().
  • bufferPtr
    Pointer to buffer where to store the unique file name.
  • bufferSize
    Size in bytes of the buffer.


Returns

  • >0
    Number of copied bytes.
  • -1
    Failure.


Table of Contents >> Application Reference >> File System Interface