Lines Matching refs:path

194 bool CFindFile::FindFirst(CFSTR path, CFileInfo &fi)

202 _handle = ::FindFirstFileA(fs2fas(path), &fd);
213 _handle = ::FindFirstFileW(fs2us(path), &fd);
218 if (GetSuperPath(path, superPath, USE_MAIN_PATH))
319 bool CFindStream::FindFirst(CFSTR path, CStreamInfo &si)
332 _handle = g_FindFirstStreamW(fs2us(path), My_FindStreamInfoStandard, &sd, 0);
337 // long name can be tricky for path like ".\dirName".
342 if (GetSuperPath(path, superPath, USE_MAIN_PATH))
404 returns ERROR_BAD_NETPATH. You must specify a path to a subfolder on that share.
407 DWORD GetFileAttrib(CFSTR path)
411 return ::GetFileAttributes(fs2fas(path));
417 DWORD dw = ::GetFileAttributesW(fs2us(path));
425 if (GetSuperPath(path, superPath, USE_MAIN_PATH))
433 /* if path is "c:" or "c::" then CFileInfo::Find() returns name of current folder for that disk
434 so instead of absolute path we have relative path in Name. That is not good in some calls */
456 bool CFileInfo::Find(CFSTR path, bool followLink)
460 if (IS_PATH_SEPAR(path[0]) &&
461 IS_PATH_SEPAR(path[1]) &&
462 path[2] == '.' &&
463 path[3] == 0)
468 Name = path + 2;
473 if (IsDevicePath(path))
476 Name = path + 4;
479 if (NName::IsDrivePath2(path + 4) && path[6] == 0)
481 FChar drive[4] = { path[4], ':', '\\', 0 };
491 // ::OutputDebugStringW(path);
492 if (!inFile.Open(path))
503 const int colonPos = FindAltStreamColon(path);
504 if (colonPos >= 0 && path[(unsigned)colonPos + 1] != 0)
506 UString streamName = fs2us(path + (unsigned)colonPos);
507 FString filePath (path);
579 if (IsSuperPath(path))
582 if (NName::IsDrivePath(path + rootSize) && path[rootSize + 3] == 0)
584 DWORD attrib = GetFileAttrib(path);
589 Name = path + rootSize;
591 if (!Fill_From_ByHandleFileInfo(path))
597 else if (IS_PATH_SEPAR(path[0]))
599 if (path[1] == 0)
601 DWORD attrib = GetFileAttrib(path);
612 const unsigned prefixSize = GetNetworkServerPrefixSize(path);
613 if (prefixSize > 0 && path[prefixSize] != 0)
615 if (NName::FindSepar(path + prefixSize) < 0)
617 if (Fill_From_ByHandleFileInfo(path))
619 Name = path + prefixSize;
623 FString s (path);
631 Name = path + prefixSize;
639 DWORD attrib = GetFileAttrib(path);
647 Name = path + prefixSize;
659 bool res = finder.FindFirst(path, *this);
665 // return FollowReparse(path, IsDir());
666 return Fill_From_ByHandleFileInfo(path);
669 bool CFileInfoBase::Fill_From_ByHandleFileInfo(CFSTR path)
672 if (!NIO::CFileBase::GetFileInformation(path, &info))
685 bool CFileInfo::FollowReparse(CFSTR path, bool isDir)
689 FString prefix = path;
692 // "folder/." refers to folder itself. So we can't use that path
719 if (inFile.Open(path))
844 HANDLE CFindChangeNotification::FindFirst(CFSTR path, bool watchSubtree, DWORD notifyFilter)
848 _handle = ::FindFirstChangeNotification(fs2fas(path), BoolToBOOL(watchSubtree), notifyFilter);
853 _handle = ::FindFirstChangeNotificationW(fs2us(path), BoolToBOOL(watchSubtree), notifyFilter);
858 if (GetSuperPath(path, superPath, USE_MAIN_PATH))
928 static int MY__lstat(CFSTR path, struct stat *st, bool followLink)
936 res = lstat(path, st);
942 res = stat(path, st);
961 static const char *Get_Name_from_Path(CFSTR path) throw()
963 size_t len = strlen(path);
965 return path;
966 const char *p = path + len - 1;
968 if (p == path)
969 return path;
977 if (p == path)
978 return path;
1114 bool CFileInfo::Find_DontFill_Name(CFSTR path, bool followLink)
1117 if (MY__lstat(path, &st, followLink) != 0)
1119 // printf("\nFind_DontFill_Name : name=%s\n", path);
1125 bool CFileInfo::Find(CFSTR path, bool followLink)
1127 // printf("\nCEnumerator::Find() name = %s\n", path);
1128 if (!Find_DontFill_Name(path, followLink))
1133 Name = Get_Name_from_Path(path);
1288 if (fi.Find_DontFill_Name(path))
1315 const FString path = _wildcard + s;
1316 int res = MY__lstat(path, &st, followLink);