version 1.86, 2012/07/30 09:23:47
|
version 1.87.10.4, 2013/09/05 02:45:13
|
|
|
return root; | return root; |
} | } |
| |
|
#ifdef PEGASUS_ENABLE_PROTOCOL_WEB |
|
|
|
String FileSystem::getAbsoluteFileName( |
|
const String& filename) |
|
{ |
|
#ifdef PEGASUS_OS_LINUX |
|
char resolvedName[PATH_MAX+1]; |
|
#endif |
|
#ifdef PEGASUS_OS_ZOS |
|
char resolvedName[_POSIX_PATH_MAX+1]; |
|
#endif |
|
//for other platform,please add here. |
|
|
|
/* |
|
* ReturnValue: |
|
* 1) Upon successful completion, realpath() shall return a pointer to |
|
* the buffer containing the resolved name. Otherwise, realpath() |
|
* shall return a null pointer and set errno to indicate the error. |
|
* 2) If the resolved_name argument is a null pointer, the pointer |
|
* returned by realpath() can be passed to free(). |
|
* 3) If the resolved_name argument is not a null pointer and the |
|
* realpath() function fails, the contents of the buffer pointed to |
|
* by resolved_name are undefined. |
|
*/ |
|
char* result = realpath(filename.getCString(), resolvedName); |
|
if (!result) |
|
{// failed, resolvedName is undefined |
|
return String(""); |
|
} |
|
return String(result); |
|
} |
|
|
|
#endif |
|
|
String FileSystem::buildLibraryFileName(const String &libraryName) | String FileSystem::buildLibraryFileName(const String &libraryName) |
{ | { |
String fileName; | String fileName; |
|
|
#endif | #endif |
} | } |
| |
|
#if defined(PEGASUS_OS_HPUX) |
void FileSystem::syncWithDirectoryUpdates(PEGASUS_STD(fstream)& fs) | void FileSystem::syncWithDirectoryUpdates(PEGASUS_STD(fstream)& fs) |
{ | { |
#if defined(PEGASUS_OS_HPUX) |
|
#if defined (PEGASUS_PLATFORM_HPUX_IA64_GNU) || \ | #if defined (PEGASUS_PLATFORM_HPUX_IA64_GNU) || \ |
defined (PEGASUS_PLATFORM_HPUX_PARISC_GNU) | defined (PEGASUS_PLATFORM_HPUX_PARISC_GNU) |
// Writes the data from the iostream buffers to the OS buffers | // Writes the data from the iostream buffers to the OS buffers |
|
|
// Writes the data from the OS buffers to the disk | // Writes the data from the OS buffers to the disk |
fsync(fs.rdbuf()->fd()); | fsync(fs.rdbuf()->fd()); |
#endif | #endif |
#endif |
|
} | } |
|
#else |
|
void FileSystem::syncWithDirectoryUpdates(PEGASUS_STD(fstream)&) |
|
{ |
|
//Not HP-UX, do nothing (compiler will remove this fct on optimization) |
|
} |
|
#endif |
| |
Boolean FileSystem::glob( | Boolean FileSystem::glob( |
const String& path, | const String& path, |