From 1b388722b8ee7d5aed646dca229190e88c62e937 Mon Sep 17 00:00:00 2001 From: Daniele Cocca
Date: Sat, 27 Mar 2010 02:48:29 +0100 Subject: [PATCH 7/7] Two more useless functions removed. --- myserver/include/base/file/files_utility.h | 2 - myserver/src/base/file/files_utility.cpp | 47 +-------------------------- 2 files changed, 2 insertions(+), 47 deletions(-) diff --git a/myserver/include/base/file/files_utility.h b/myserver/include/base/file/files_utility.h index 77e06a6..f8e79b4 100644 --- a/myserver/include/base/file/files_utility.h +++ b/myserver/include/base/file/files_utility.h @@ -89,8 +89,6 @@ public: static void splitPath (const char* path, char* dir, char*filename); static void splitPath (string const &path, string& dir, string& filename); - static int getFilenameLength (const char*, int *); - static void getFilename (const char* path, char* filename); static void getFilename (string const &path, string& filename); static int rmdir (const char *path); diff --git a/myserver/src/base/file/files_utility.cpp b/myserver/src/base/file/files_utility.cpp index 61c4a88..75b2cfc 100644 --- a/myserver/src/base/file/files_utility.cpp +++ b/myserver/src/base/file/files_utility.cpp @@ -60,7 +60,7 @@ FilesUtility::FilesUtility () } /*! - * This funtion iterates through every character of the path + * This function iterates through every character of the path * The first IF tries to clear out the bars, if it finds one, * just advances one character and starts the cycle again * The second IF tries to find at least two dots. @@ -275,7 +275,7 @@ int FilesUtility::nodeExists (const char* filename) NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL); - int nRet = hFile != INVALID_HANDLE_VALUE ? 1 : 0; + int nRet = (hFile != INVALID_HANDLE_VALUE) ? 1 : 0; CloseHandle (hFile); return nRet; #else @@ -369,49 +369,6 @@ int FilesUtility::chown (const char* filename, string &uid, string &gid) } /*! - *Get the length of the file in the path. - *\param path The full path where get the filename length. - *\param filename A pointer to the start of the file name. - */ -int FilesUtility::getFilenameLength (const char *path, int *filename) -{ - int splitpoint = static_cast