public bool IsVirtualResource(ResourcePath rp) { if (rp == null) { return(false); } int numPathSegments = rp.Count(); if (numPathSegments == 0) { return(false); } ResourcePath firstRPSegment = new ResourcePath(new ProviderPathSegment[] { rp[0] }); String pathRoot = Path.GetPathRoot(LocalFsResourceProviderBase.ToDosPath(firstRPSegment)); if (string.IsNullOrEmpty(pathRoot) || pathRoot.Length < 2) { return(false); } string fullPath = LocalFsResourceProviderBase.ToDosPath(rp); if (!string.IsNullOrEmpty(fullPath) && fullPath.Equals(_dokanExecutor.MountPoint, StringComparison.InvariantCultureIgnoreCase)) { return(true); } return(false); }
public bool IsVirtualResource(ResourcePath rp) { if (rp == null) { return(false); } int numPathSegments = rp.Count(); if (numPathSegments == 0) { return(false); } ResourcePath firstRPSegment = new ResourcePath(new ProviderPathSegment[] { rp[0] }); String pathRoot = Path.GetPathRoot(LocalFsResourceProviderBase.ToDosPath(firstRPSegment)); if (string.IsNullOrEmpty(pathRoot)) { return(false); } return(Dokan.Dokan.IsDokanDrive(pathRoot[0])); }
public bool IsVirtualResource(ResourcePath rp) { if (rp == null) { return(false); } int numPathSegments = rp.Count(); if (numPathSegments == 0) { return(false); } ResourcePath firstRPSegment = new ResourcePath(new ProviderPathSegment[] { rp[0] }); String pathRoot = Path.GetPathRoot(LocalFsResourceProviderBase.ToDosPath(firstRPSegment)); if (string.IsNullOrEmpty(pathRoot) || pathRoot.Length < 2) { return(false); } // The provider may also point to an UNC path, so we need to check this first. Dokan based check depends on actual drive letters. return(pathRoot[1] == ':' && Dokan.Dokan.IsDokanDrive(pathRoot[0])); }
public bool IsVirtualResource(ResourcePath rp) { if (rp == null) return false; int numPathSegments = rp.Count(); if (numPathSegments == 0) return false; ResourcePath firstRPSegment = new ResourcePath(new ProviderPathSegment[] { rp[0] }); String pathRoot = Path.GetPathRoot(LocalFsResourceProviderBase.ToDosPath(firstRPSegment)); if (string.IsNullOrEmpty(pathRoot)) return false; return Dokan.Dokan.IsDokanDrive(pathRoot[0]); }
public bool IsVirtualResource(ResourcePath rp) { if (rp == null) return false; int numPathSegments = rp.Count(); if (numPathSegments == 0) return false; ResourcePath firstRPSegment = new ResourcePath(new ProviderPathSegment[] { rp[0] }); String pathRoot = Path.GetPathRoot(LocalFsResourceProviderBase.ToDosPath(firstRPSegment)); if (string.IsNullOrEmpty(pathRoot) || pathRoot.Length < 2) return false; // The provider may also point to an UNC path, so we need to check this first. Dokan based check depends on actual drive letters. return pathRoot[1] == ':' && Dokan.Dokan.IsDokanDrive(pathRoot[0]); }