aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--XBMC.xcodeproj/project.pbxproj10
-rw-r--r--project/VS2010Express/XBMC.vcxproj2
-rw-r--r--project/VS2010Express/XBMC.vcxproj.filters6
-rw-r--r--xbmc/filesystem/HDDirectory.cpp188
-rw-r--r--xbmc/filesystem/HDDirectory.h37
-rw-r--r--xbmc/filesystem/Makefile.in1
6 files changed, 0 insertions, 244 deletions
diff --git a/XBMC.xcodeproj/project.pbxproj b/XBMC.xcodeproj/project.pbxproj
index 1846b9b3d0..baae59d9a8 100644
--- a/XBMC.xcodeproj/project.pbxproj
+++ b/XBMC.xcodeproj/project.pbxproj
@@ -1611,7 +1611,6 @@
DFF0F1FE17528350002DA3A4 /* FileReaderFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6731444A8B0007C6459 /* FileReaderFile.cpp */; };
DFF0F1FF17528350002DA3A4 /* FTPDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16E40D25F9FA00618676 /* FTPDirectory.cpp */; };
DFF0F20017528350002DA3A4 /* FTPParse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16E60D25F9FA00618676 /* FTPParse.cpp */; };
- DFF0F20117528350002DA3A4 /* HDDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16E80D25F9FA00618676 /* HDDirectory.cpp */; };
DFF0F20217528350002DA3A4 /* HDFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6751444A8B0007C6459 /* HDFile.cpp */; };
DFF0F20317528350002DA3A4 /* HDHomeRunDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D7F51444B568007C6459 /* HDHomeRunDirectory.cpp */; };
DFF0F20417528350002DA3A4 /* HDHomeRunFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D7F01444B54A007C6459 /* HDHomeRunFile.cpp */; };
@@ -2365,7 +2364,6 @@
E38E20130D25F9FD00618676 /* FileFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16C40D25F9FA00618676 /* FileFactory.cpp */; };
E38E20230D25F9FD00618676 /* FTPDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16E40D25F9FA00618676 /* FTPDirectory.cpp */; };
E38E20240D25F9FD00618676 /* FTPParse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16E60D25F9FA00618676 /* FTPParse.cpp */; };
- E38E20250D25F9FD00618676 /* HDDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16E80D25F9FA00618676 /* HDDirectory.cpp */; };
E38E20270D25F9FD00618676 /* IDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16EC0D25F9FA00618676 /* IDirectory.cpp */; };
E38E20280D25F9FD00618676 /* IFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16EE0D25F9FA00618676 /* IFile.cpp */; };
E38E20290D25F9FD00618676 /* iso9660.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16F10D25F9FA00618676 /* iso9660.cpp */; };
@@ -2892,7 +2890,6 @@
E4991267174E5D8F00741B6D /* FileReaderFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6731444A8B0007C6459 /* FileReaderFile.cpp */; };
E4991268174E5D8F00741B6D /* FTPDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16E40D25F9FA00618676 /* FTPDirectory.cpp */; };
E4991269174E5D8F00741B6D /* FTPParse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16E60D25F9FA00618676 /* FTPParse.cpp */; };
- E499126A174E5D8F00741B6D /* HDDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E16E80D25F9FA00618676 /* HDDirectory.cpp */; };
E499126B174E5D8F00741B6D /* HDFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6751444A8B0007C6459 /* HDFile.cpp */; };
E499126C174E5D8F00741B6D /* HDHomeRunDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D7F51444B568007C6459 /* HDHomeRunDirectory.cpp */; };
E499126D174E5D8F00741B6D /* HDHomeRunFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D7F01444B54A007C6459 /* HDHomeRunFile.cpp */; };
@@ -5397,8 +5394,6 @@
E38E16E50D25F9FA00618676 /* FTPDirectory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FTPDirectory.h; sourceTree = "<group>"; };
E38E16E60D25F9FA00618676 /* FTPParse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FTPParse.cpp; sourceTree = "<group>"; };
E38E16E70D25F9FA00618676 /* FTPParse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FTPParse.h; sourceTree = "<group>"; };
- E38E16E80D25F9FA00618676 /* HDDirectory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HDDirectory.cpp; sourceTree = "<group>"; };
- E38E16E90D25F9FA00618676 /* HDDirectory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HDDirectory.h; sourceTree = "<group>"; };
E38E16EC0D25F9FA00618676 /* IDirectory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDirectory.cpp; sourceTree = "<group>"; };
E38E16ED0D25F9FA00618676 /* IDirectory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDirectory.h; sourceTree = "<group>"; };
E38E16EE0D25F9FA00618676 /* IFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IFile.cpp; sourceTree = "<group>"; };
@@ -9182,8 +9177,6 @@
E38E16E50D25F9FA00618676 /* FTPDirectory.h */,
E38E16E60D25F9FA00618676 /* FTPParse.cpp */,
E38E16E70D25F9FA00618676 /* FTPParse.h */,
- E38E16E80D25F9FA00618676 /* HDDirectory.cpp */,
- E38E16E90D25F9FA00618676 /* HDDirectory.h */,
DF93D6751444A8B0007C6459 /* HDFile.cpp */,
DF93D6761444A8B0007C6459 /* HDFile.h */,
DF93D7F51444B568007C6459 /* HDHomeRunDirectory.cpp */,
@@ -10771,7 +10764,6 @@
E38E20130D25F9FD00618676 /* FileFactory.cpp in Sources */,
E38E20230D25F9FD00618676 /* FTPDirectory.cpp in Sources */,
E38E20240D25F9FD00618676 /* FTPParse.cpp in Sources */,
- E38E20250D25F9FD00618676 /* HDDirectory.cpp in Sources */,
E38E20270D25F9FD00618676 /* IDirectory.cpp in Sources */,
E38E20280D25F9FD00618676 /* IFile.cpp in Sources */,
E38E20290D25F9FD00618676 /* iso9660.cpp in Sources */,
@@ -12136,7 +12128,6 @@
DFF0F1FE17528350002DA3A4 /* FileReaderFile.cpp in Sources */,
DFF0F1FF17528350002DA3A4 /* FTPDirectory.cpp in Sources */,
DFF0F20017528350002DA3A4 /* FTPParse.cpp in Sources */,
- DFF0F20117528350002DA3A4 /* HDDirectory.cpp in Sources */,
DFF0F20217528350002DA3A4 /* HDFile.cpp in Sources */,
DFF0F20317528350002DA3A4 /* HDHomeRunDirectory.cpp in Sources */,
DFF0F20417528350002DA3A4 /* HDHomeRunFile.cpp in Sources */,
@@ -13340,7 +13331,6 @@
E4991267174E5D8F00741B6D /* FileReaderFile.cpp in Sources */,
E4991268174E5D8F00741B6D /* FTPDirectory.cpp in Sources */,
E4991269174E5D8F00741B6D /* FTPParse.cpp in Sources */,
- E499126A174E5D8F00741B6D /* HDDirectory.cpp in Sources */,
E499126B174E5D8F00741B6D /* HDFile.cpp in Sources */,
E499126C174E5D8F00741B6D /* HDHomeRunDirectory.cpp in Sources */,
E499126D174E5D8F00741B6D /* HDHomeRunFile.cpp in Sources */,
diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj
index 175af49e33..ad5828cfe3 100644
--- a/project/VS2010Express/XBMC.vcxproj
+++ b/project/VS2010Express/XBMC.vcxproj
@@ -300,7 +300,6 @@
<ClCompile Include="..\..\xbmc\filesystem\FileReaderFile.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\FTPDirectory.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\FTPParse.cpp" />
- <ClCompile Include="..\..\xbmc\filesystem\HDDirectory.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\HDFile.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\HDHomeRunDirectory.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\HDHomeRunFile.cpp" />
@@ -1038,7 +1037,6 @@
<ClInclude Include="..\..\xbmc\filesystem\FileReaderFile.h" />
<ClInclude Include="..\..\xbmc\filesystem\FTPDirectory.h" />
<ClInclude Include="..\..\xbmc\filesystem\FTPParse.h" />
- <ClInclude Include="..\..\xbmc\filesystem\HDDirectory.h" />
<ClInclude Include="..\..\xbmc\filesystem\HDFile.h" />
<ClInclude Include="..\..\xbmc\filesystem\HDHomeRunDirectory.h" />
<ClInclude Include="..\..\xbmc\filesystem\HDHomeRunFile.h" />
diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters
index 600c47c98f..013dacab71 100644
--- a/project/VS2010Express/XBMC.vcxproj.filters
+++ b/project/VS2010Express/XBMC.vcxproj.filters
@@ -2053,9 +2053,6 @@
<ClCompile Include="..\..\xbmc\filesystem\FTPParse.cpp">
<Filter>filesystem</Filter>
</ClCompile>
- <ClCompile Include="..\..\xbmc\filesystem\HDDirectory.cpp">
- <Filter>filesystem</Filter>
- </ClCompile>
<ClCompile Include="..\..\xbmc\filesystem\HDFile.cpp">
<Filter>filesystem</Filter>
</ClCompile>
@@ -5038,9 +5035,6 @@
<ClInclude Include="..\..\xbmc\filesystem\FTPParse.h">
<Filter>filesystem</Filter>
</ClInclude>
- <ClInclude Include="..\..\xbmc\filesystem\HDDirectory.h">
- <Filter>filesystem</Filter>
- </ClInclude>
<ClInclude Include="..\..\xbmc\filesystem\HDFile.h">
<Filter>filesystem</Filter>
</ClInclude>
diff --git a/xbmc/filesystem/HDDirectory.cpp b/xbmc/filesystem/HDDirectory.cpp
deleted file mode 100644
index 49a5a72f5a..0000000000
--- a/xbmc/filesystem/HDDirectory.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (C) 2005-2013 Team XBMC
- * http://xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "HDDirectory.h"
-#include "Util.h"
-#include "iso9660.h"
-#include "URL.h"
-#include "FileItem.h"
-#include "utils/AutoPtrHandle.h"
-#include "utils/AliasShortcutUtils.h"
-#include "utils/URIUtils.h"
-
-#ifdef TARGET_WINDOWS
-#include "utils/CharsetConverter.h"
-#include "win32/WIN32Util.h"
-#endif
-
-#ifndef INVALID_FILE_ATTRIBUTES
-#define INVALID_FILE_ATTRIBUTES ((DWORD) -1)
-#endif
-
-#ifdef TARGET_WINDOWS
-typedef WIN32_FIND_DATAW LOCAL_WIN32_FIND_DATA;
-#define LocalFindFirstFile FindFirstFileW
-#define LocalFindNextFile FindNextFileW
-#else
-typedef WIN32_FIND_DATA LOCAL_WIN32_FIND_DATA;
-#define LocalFindFirstFile FindFirstFile
-#define LocalFindNextFile FindNextFile
-#endif
-
-using namespace AUTOPTR;
-using namespace XFILE;
-
-CHDDirectory::CHDDirectory(void)
-{}
-
-CHDDirectory::~CHDDirectory(void)
-{}
-
-bool CHDDirectory::GetDirectory(const CStdString& strPath1, CFileItemList &items)
-{
- LOCAL_WIN32_FIND_DATA wfd;
- memset(&wfd, 0, sizeof(wfd));
-
- CStdString strPath=strPath1;
-
- if (IsAliasShortcut(strPath))
- TranslateAliasShortcut(strPath);
-
- CStdString strRoot = strPath;
- CURL url(strPath);
-
- URIUtils::AddSlashAtEnd(strRoot);
- if (URIUtils::IsDVD(strRoot) && m_isoReader.IsScanned())
- {
- // Reset iso reader and remount or
- // we can't access the dvd-rom
- m_isoReader.Reset();
- }
-
-#ifdef TARGET_WINDOWS
- std::wstring strSearchMask(CWIN32Util::ConvertPathToWin32Form(strRoot));
- strSearchMask += L"*.*";
-#else
- CStdString strSearchMask(strRoot);
-#endif
-
- FILETIME localTime;
- CAutoPtrFind hFind ( LocalFindFirstFile(strSearchMask.c_str(), &wfd));
-
- // on error, check if path exists at all, this will return true if empty folder
- if (!hFind.isValid())
- return Exists(strPath1);
-
- if (hFind.isValid())
- {
- do
- {
- if (wfd.cFileName[0] != 0)
- {
- CStdString strLabel;
-#ifdef TARGET_WINDOWS
- g_charsetConverter.wToUTF8(wfd.cFileName,strLabel, true);
-#else
- strLabel = wfd.cFileName;
-#endif
- if ( (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) )
- {
- if (strLabel != "." && strLabel != "..")
- {
- CFileItemPtr pItem(new CFileItem(strLabel));
- CStdString itemPath(URIUtils::AddFileToFolder(strRoot, strLabel));
- URIUtils::AddSlashAtEnd(itemPath);
- pItem->SetPath(itemPath);
- pItem->m_bIsFolder = true;
- FileTimeToLocalFileTime(&wfd.ftLastWriteTime, &localTime);
- pItem->m_dateTime=localTime;
-
- if (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
- pItem->SetProperty("file:hidden", true);
- items.Add(pItem);
- }
- }
- else
- {
- CFileItemPtr pItem(new CFileItem(strLabel));
- pItem->SetPath(URIUtils::AddFileToFolder(strRoot, strLabel));
- pItem->m_bIsFolder = false;
- pItem->m_dwSize = CUtil::ToInt64(wfd.nFileSizeHigh, wfd.nFileSizeLow);
- FileTimeToLocalFileTime(&wfd.ftLastWriteTime, &localTime);
- pItem->m_dateTime=localTime;
-
- if (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
- pItem->SetProperty("file:hidden", true);
-
- items.Add(pItem);
- }
- }
- }
- while (LocalFindNextFile((HANDLE)hFind, &wfd));
- }
- return true;
-}
-
-bool CHDDirectory::Create(const char* strPath)
-{
- if (!strPath || !*strPath)
- return false;
- CStdString strPath1 = strPath;
- URIUtils::AddSlashAtEnd(strPath1);
-
-#ifdef TARGET_WINDOWS
- if (strPath1.size() == 3 && strPath1[1] == ':')
- return Exists(strPath); // A drive - we can't "create" a drive
- if(::CreateDirectoryW(CWIN32Util::ConvertPathToWin32Form(strPath1).c_str(), NULL))
-#else
- if(::CreateDirectory(strPath1.c_str(), NULL))
-#endif
- return true;
- else if(GetLastError() == ERROR_ALREADY_EXISTS)
- return true;
-
- return false;
-}
-
-bool CHDDirectory::Remove(const char* strPath)
-{
- if (!strPath || !*strPath)
- return false;
-#ifdef TARGET_WINDOWS
- return (::RemoveDirectoryW(CWIN32Util::ConvertPathToWin32Form(strPath).c_str()) || GetLastError() == ERROR_PATH_NOT_FOUND) ? true : false;
-#else
- return ::RemoveDirectory(strPath) ? true : false;
-#endif
-}
-
-bool CHDDirectory::Exists(const char* strPath)
-{
- if (!strPath || !*strPath)
- return false;
-#ifdef TARGET_WINDOWS
- DWORD attributes = GetFileAttributesW(CWIN32Util::ConvertPathToWin32Form(strPath).c_str());
-#else
- DWORD attributes = GetFileAttributes(strPath);
-#endif
- if(attributes == INVALID_FILE_ATTRIBUTES)
- return false;
- if (FILE_ATTRIBUTE_DIRECTORY & attributes) return true;
- return false;
-}
diff --git a/xbmc/filesystem/HDDirectory.h b/xbmc/filesystem/HDDirectory.h
deleted file mode 100644
index 52f590a399..0000000000
--- a/xbmc/filesystem/HDDirectory.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#pragma once
-/*
- * Copyright (C) 2005-2013 Team XBMC
- * http://xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "IDirectory.h"
-
-namespace XFILE
-{
-
-class CHDDirectory : public IDirectory
-{
-public:
- CHDDirectory(void);
- virtual ~CHDDirectory(void);
- virtual bool GetDirectory(const CStdString& strPath, CFileItemList &items);
- virtual bool Create(const char* strPath);
- virtual bool Exists(const char* strPath);
- virtual bool Remove(const char* strPath);
-};
-}
diff --git a/xbmc/filesystem/Makefile.in b/xbmc/filesystem/Makefile.in
index 725951e8db..563fa874bf 100644
--- a/xbmc/filesystem/Makefile.in
+++ b/xbmc/filesystem/Makefile.in
@@ -25,7 +25,6 @@ SRCS += FileFactory.cpp
SRCS += FileReaderFile.cpp
SRCS += FTPDirectory.cpp
SRCS += FTPParse.cpp
-SRCS += HDDirectory.cpp
SRCS += HDFile.cpp
SRCS += HDHomeRunDirectory.cpp
SRCS += HDHomeRunFile.cpp