Filter the files by their storage location using a storage location id.

@param int $fslID storage location id
543595
public function filterByStorageLocationID($fslID)
    {
        $fslID = (int) $fslID;
        $this->query->andWhere('f.fslID = :fslID');
        $this->query->setParameter('fslID', $fslID);
    }
669548
public function loadContentInfoByLocationId($locationId)
    {
        try {
            return $this->innerGateway->loadContentInfoByLocationId($locationId);
        } catch (DBALException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        } catch (\PDOException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        }
    }
59748
protected function _filterFile(SplFileInfo $fileInfo)
    {
        if (!$fileInfo->isFile()) {
            return false;
        }

        if (($expr = $this->_getFilenameRegex()) && !preg_match($expr, $fileInfo->getPathname())) {
            return false;
        }

        if (($callback = $this->_getCallbackFilter()) && !call_user_func_array($callback, array($fileInfo))) {
            return false;
        }

        return true;
    }
828640
function filterFiles(files, recursive) {
    var fileOrDir = function fileOrDir(lstat) {
        return lstat.isFile() || lstat.isDirectory();
    };
    return files.filter(function (_ref) {
        var lstat = _ref.lstat;

        return recursive ? fileOrDir(lstat) : lstat.isFile();
    });
}
666856
public function blockFilter($filterId) {

	    if(!in_array($filterId, $this->blockedFilters)) {
	        $this->blockedFilters[] = $filterId;
        }

        return $this;

    }
1133362
protected function getFilesystemFor($fileID)
    {
        return $this->applyToFileIDOnFilesystem(
            function (ParsedFileID $parsedFileID, Filesystem $fs) {
                return $fs;
            },
            $fileID
        );
    }
390118
protected function deleteFromFilesystem($fileID, Filesystem $filesystem)
    {
        $deleted = false;
        foreach ($this->findVariants($fileID, $filesystem) as $nextID) {
            $filesystem->delete($nextID);
            $deleted = true;
        }

        // Truncate empty dirs
        $this->truncateDirectory(dirname($fileID), $filesystem);

        return $deleted;
    }
233900
public function findByFolderId($folderId)
    {
        $qb = $this->createQueryBuilder();

        $qb->field('mediaFolder.id')->equals($folderId);

        return $qb->getQuery()->execute();
    }
556130
public function filterByPageTypeID($ptID)
    {
        $this->filterByPageType = true;
        $db = Loader::db();
        if (is_array($ptID)) {
            $cth = '(';
            for ($i = 0; $i < count($ptID); ++$i) {
                if ($i > 0) {
                    $cth .= ',';
                }
                $cth .= $db->quote($ptID[$i]);
            }
            $cth .= ')';
            $this->filter(false, "(pt.ptID in {$cth})");
        } else {
            $this->filter("pt.ptID", $ptID);
        }
    }
677663
public final synchronized void findFiles(File directory, FileFilter filter, Collection<? super File> fileOut) {
		if (directory != null && filter != null) {
			File candidate;
			final List<File> candidates = new ArrayList<>();

			final String relativePath = removePathPrefix(getBaseDirectory(), directory);

			getLog().debug("Retreiving " //$NON-NLS-1$
					+ filter.toString() + " files from " //$NON-NLS-1$
					+ relativePath);

			candidates.add(directory);
			int nbFiles = 0;

			while (!candidates.isEmpty()) {
				candidate = candidates.remove(0);
				if (candidate.isDirectory()) {
					final File[] children = candidate.listFiles(filter);
					if (children != null) {
						for (final File child : children) {
							if (child != null && child.isDirectory()) {
								candidates.add(child);
							} else {
								fileOut.add(child);
								++nbFiles;
							}
						}
					}
				}
			}

			getLog().debug("Found " //$NON-NLS-1$
					+ nbFiles + " file(s)"); //$NON-NLS-1$
		}
	}
233116
public function countByFolderId($folderId)
    {
        $qb = $this->createQueryBuilder();

        $qb->field('mediaFolder.id')->equals($folderId);

        return $qb->getQuery()->count();
    }
1132082
public function deleteFromId( $MacFilterId){
        $rest = $this->getService( self::API_WIFI_MAC_FILTER . $MacFilterId);
        $rest->DELETE();

        return $rest->getSuccess();
    }
997637
public function delete($fileIDs)
    {
        if (is_array($fileIDs)) {
            $fileIDs = implode(',', $fileIDs);
        }

        $data = [
            'file_ids' => $fileIDs
        ];

        return $this->post('files/delete', $data, \true);
    }
945454
public function touch($fileId, $optParams = array())
  {
    $params = array('fileId' => $fileId);
    $params = array_merge($params, $optParams);
    return $this->call('touch', array($params), "Drive_DriveFile");
  }
174740
public function getEntry($entryId) {
        $this->gotoEntry($entryId);
        return $this->getFile()->fread(self::B_SZ);
    }
1135069
public function actionDataFiles($folderId = 0, $search = null)
    {
        $query = StorageFile::find()
            ->select(['id', 'name_original', 'extension', 'upload_timestamp', 'file_size', 'mime_type'])
            ->where(['is_hidden' => false, 'is_deleted' => false])
            ->with(['images.file']);

        if (!empty($search)) {
            $query->andFilterWhere(['or', 
                ['like', 'name_original', $search],
                ['like', 'caption', $search],
                ['=', 'id', $search],
            ]);
        } else {
            $query->andWhere(['folder_id' => $folderId]);
        }

        return new ActiveDataProvider([
            'query' => $query,
        ]);
    }
270876
public function clearCacheFile($elementId)
    {
        // get all possible caches
        $elements = HtmlCacheElement::findAll(['elementId' => $elementId]);
        // \craft::Dd($elements);
        $cacheIds = array_map(function ($el) {
            return $el->cacheId;
        }, $elements);

        // get all possible caches
        $caches = HtmlCacheCache::findAll(['id' => $cacheIds]);
        foreach ($caches as $cache) {
            $file = $this->getCacheFileName($cache->uid);
            if (file_exists($file)) {
                @unlink($file);
            }
        }


        // delete caches for related entry
        HtmlCacheCache::deleteAll(['id' => $cacheIds]);
        return true;
    }