*-----------------------------------------------------------------------------
*/
-static Bool
+Bool
FilePosixGetParent(char **canPath) // IN/OUT: Canonical file path
{
char *pathName;
}
+#if !defined(__APPLE__)
/*
*----------------------------------------------------------------------
*
return ret;
}
+#endif
#if defined(VMX86_SERVER)
uint64
File_GetCapacity(const char *pathName) // IN: Path name
{
- uint64 ret;
- char *fullPath;
- struct statfs statfsbuf;
-
- fullPath = File_FullPath(pathName);
- if (fullPath == NULL) {
- return -1;
- }
-
- if (FileGetStats(fullPath, FALSE, &statfsbuf)) {
- ret = (uint64) statfsbuf.f_blocks * statfsbuf.f_bsize;
- } else {
- Warning(LGPFX" %s: Couldn't statfs\n", __func__);
- ret = -1;
- }
-
- Posix_Free(fullPath);
-
- return ret;
+ return File_GetFreeSpace(pathName, FALSE);
}