| Index: webrtc/base/unixfilesystem.cc
|
| diff --git a/webrtc/base/unixfilesystem.cc b/webrtc/base/unixfilesystem.cc
|
| index a756ae515e21f0bddfc172e8117952b42cab6dde..9f865e68cab4567fa53c6aec4df716d44db84d93 100644
|
| --- a/webrtc/base/unixfilesystem.cc
|
| +++ b/webrtc/base/unixfilesystem.cc
|
| @@ -132,22 +132,6 @@ FileStream *UnixFilesystem::OpenFile(const Pathname &filename,
|
| return fs;
|
| }
|
|
|
| -bool UnixFilesystem::CreatePrivateFile(const Pathname &filename) {
|
| - int fd = open(filename.pathname().c_str(),
|
| - O_RDWR | O_CREAT | O_EXCL,
|
| - S_IRUSR | S_IWUSR);
|
| - if (fd < 0) {
|
| - LOG_ERR(LS_ERROR) << "open() failed.";
|
| - return false;
|
| - }
|
| - // Don't need to keep the file descriptor.
|
| - if (close(fd) < 0) {
|
| - LOG_ERR(LS_ERROR) << "close() failed.";
|
| - // Continue.
|
| - }
|
| - return true;
|
| -}
|
| -
|
| bool UnixFilesystem::DeleteFile(const Pathname &filename) {
|
| LOG(LS_INFO) << "Deleting file:" << filename.pathname();
|
|
|
| @@ -229,25 +213,6 @@ bool UnixFilesystem::MoveFile(const Pathname &old_path,
|
| return true;
|
| }
|
|
|
| -bool UnixFilesystem::MoveFolder(const Pathname &old_path,
|
| - const Pathname &new_path) {
|
| - if (!IsFolder(old_path)) {
|
| - ASSERT(IsFolder(old_path));
|
| - return false;
|
| - }
|
| - LOG(LS_VERBOSE) << "Moving " << old_path.pathname()
|
| - << " to " << new_path.pathname();
|
| - if (rename(old_path.pathname().c_str(), new_path.pathname().c_str()) != 0) {
|
| - if (errno != EXDEV)
|
| - return false;
|
| - if (!CopyFolder(old_path, new_path))
|
| - return false;
|
| - if (!DeleteFolderAndContents(old_path))
|
| - return false;
|
| - }
|
| - return true;
|
| -}
|
| -
|
| bool UnixFilesystem::IsFolder(const Pathname &path) {
|
| struct stat st;
|
| if (stat(path.pathname().c_str(), &st) < 0)
|
| @@ -347,23 +312,6 @@ bool UnixFilesystem::GetFileTime(const Pathname& path, FileTimeType which,
|
| return true;
|
| }
|
|
|
| -bool UnixFilesystem::GetAppPathname(Pathname* path) {
|
| -#if defined(__native_client__)
|
| - return false;
|
| -#elif defined(WEBRTC_MAC)
|
| - AppleAppName(path);
|
| - return true;
|
| -#else // WEBRTC_MAC && !defined(WEBRTC_IOS)
|
| - char buffer[PATH_MAX + 2];
|
| - ssize_t len = readlink("/proc/self/exe", buffer, arraysize(buffer) - 1);
|
| - if ((len <= 0) || (len == PATH_MAX + 1))
|
| - return false;
|
| - buffer[len] = '\0';
|
| - path->SetPathname(buffer);
|
| - return true;
|
| -#endif // WEBRTC_MAC && !defined(WEBRTC_IOS)
|
| -}
|
| -
|
| bool UnixFilesystem::GetAppDataFolder(Pathname* path, bool per_user) {
|
| // On macOS and iOS, there is no requirement that the path contains the
|
| // organization.
|
| @@ -503,20 +451,6 @@ bool UnixFilesystem::GetDiskFreeSpace(const Pathname& path,
|
| #endif // !__native_client__
|
| }
|
|
|
| -Pathname UnixFilesystem::GetCurrentDirectory() {
|
| - Pathname cwd;
|
| - char buffer[PATH_MAX];
|
| - char *path = getcwd(buffer, PATH_MAX);
|
| -
|
| - if (!path) {
|
| - LOG_ERR(LS_ERROR) << "getcwd() failed";
|
| - return cwd; // returns empty pathname
|
| - }
|
| - cwd.SetFolder(std::string(path));
|
| -
|
| - return cwd;
|
| -}
|
| -
|
| char* UnixFilesystem::CopyString(const std::string& str) {
|
| size_t size = str.length() + 1;
|
|
|
|
|