Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added getmointpoint command to test_physfs.
  • Loading branch information
icculus committed Apr 8, 2012
1 parent 758e5be commit 3e750a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 0 additions & 1 deletion docs/TODO.txt
Expand Up @@ -51,7 +51,6 @@ From old TODO.txt...
- Multiple write dirs with mount points?
- Replace code from SDL...
- Should file enumeration return an error or set error state?
- Need "getmountpoint" command in test_physfs.c ...
- Write up a simple HOWTO on embedding physicsfs in another project.


Expand Down
12 changes: 12 additions & 0 deletions test/test_physfs.c
Expand Up @@ -272,6 +272,17 @@ static int cmd_mount_handle(char *args)
return cmd_mount_internal(args, MNTTYPE_HANDLE);
} /* cmd_mount_handle */

static int cmd_getmountpoint(char *args)
{
if (*args == '\"')
{
args++;
args[strlen(args) - 1] = '\0';
} /* if */

printf("Dir [%s] is mounted at [%s].\n", args, PHYSFS_getMountPoint(args));
return 1;
} /* cmd_getmountpoint */

static int cmd_removearchive(char *args)
{
Expand Down Expand Up @@ -1172,6 +1183,7 @@ static const command_info commands[] =
{ "setbuffer", cmd_setbuffer, 1, "<bufferSize>" },
{ "stressbuffer", cmd_stressbuffer, 1, "<bufferSize>" },
{ "crc32", cmd_crc32, 1, "<fileToHash>" },
{ "getmountpoint", cmd_getmountpoint, 1, "<dir>" },
{ NULL, NULL, -1, NULL }
};

Expand Down

0 comments on commit 3e750a9

Please sign in to comment.