Bitrix-D7 22.6
 
Загрузка...
Поиск...
Не найдено
Класс FileHashTable
+ Граф наследования:FileHashTable:

Открытые статические члены

static getTableName ()
 
static getMap ()
 
static validateFilePath ()
 
static validateFileHash ()
 
static addList ($bucketId, array $files)
 
static syncList ($bucketId, $path, array $files, $prevLastKey)
 
static syncEnd ($bucketId, $path, $prevLastKey)
 
static addFile ($bucketId, $path, array $fileInfo)
 
static getLastKey ($bucketId)
 
static deleteAll ($bucketId)
 
static deleteByFilePath ($bucketId, $filePath)
 
static dirList ($bucketId, $path, $order, $filter)
 
static duplicateList ($bucketId, $filter, $order, $limit=0)
 
static getFileDuplicates ($bucketId, $fileHash, $fileSize)
 
static getDuplicatesStat ($bucketId)
 
static copyToFileHash ($lastKey, $pageSize)
 
static prepareDuplicates ($bucketId, &$fileIds)
 

Подробное описание

См. определение в файле filehash.php строка 35

Методы

◆ addFile()

static addFile (   $bucketId,
  $path,
array  $fileInfo 
)
static

Add a file hash to the database.

Аргументы
integer$bucketIdClouds storage bucket identifier.
string$pathPath to the file.
array$fileInfoFile info as it returned by CCloudStorageBucket::GetFileInfo.
Возвращает
null|Main\DB\Result
См. также
CCloudStorageBucket::GetFileInfo

См. определение в файле filehash.php строка 269

◆ addList()

static addList (   $bucketId,
array  $files 
)
static

Stores file hashes to the database.

Аргументы
integer$bucketIdClouds storage bucket identifier.
array$filesFile list as it returned by CCloudStorageBucket::ListFiles.
Возвращает
Main\DB\Result
См. также
CCloudStorageBucket::ListFiles

См. определение в файле filehash.php строка 119

◆ copyToFileHash()

static copyToFileHash (   $lastKey,
  $pageSize 
)
static

Copies file hash information from clouds module table to the main module. Returns an array with copy statistics information.

Аргументы
integer$lastKeyWhere to start.
integer$pageSizeBatch size.
Возвращает
array

См. определение в файле filehash.php строка 512

◆ deleteAll()

static deleteAll (   $bucketId)
static

Clears all stored file hashes for the bucket.

Аргументы
integer$bucketIdClouds storage bucket identifier.
Возвращает
Main\DB\Result

См. определение в файле filehash.php строка 303

◆ deleteByFilePath()

static deleteByFilePath (   $bucketId,
  $filePath 
)
static

Clears a stored file hashe for the filePath for the bucket.

Аргументы
integer$bucketIdClouds storage bucket identifier.
string$filePathFile path.
Возвращает
Main\DB\Result

См. определение в файле filehash.php строка 320

◆ dirList()

static dirList (   $bucketId,
  $path,
  $order,
  $filter 
)
static

Returns file listing with "folders", sizes and modification times.

Аргументы
integer$bucketIdClouds storage bucket identifier.
string$pathDirectory path.
array$orderHow to sort.
array$filterAdditional filter.
Возвращает
Main\DB\Result

См. определение в файле filehash.php строка 344

◆ duplicateList()

static duplicateList (   $bucketId,
  $filter,
  $order,
  $limit = 0 
)
static

Returns duplicate files by bucket, hash, and size.

Аргументы
integer$bucketIdClouds storage bucket identifier.
array$filterAdditional filter to pass to FileHashTable.
array$orderSort order.
integer$limitRecords count.
Возвращает
Main\DB\Result
См. также
\Bitrix\Main\File\Internal\FileHashTable

См. определение в файле filehash.php строка 398

◆ getDuplicatesStat()

static getDuplicatesStat (   $bucketId)
static

Returns duplicates summary statistics.

Аргументы
integer$bucketIdClouds storage bucket identifier.
Возвращает
array

См. определение в файле filehash.php строка 477

◆ getFileDuplicates()

static getFileDuplicates (   $bucketId,
  $fileHash,
  $fileSize 
)
static

Returns duplicate files list by bucket, hash, and size.

Аргументы
integer$bucketIdClouds storage bucket identifier.
array$fileHashFile hash.
array$fileSizeFile size.
Возвращает
array
См. также
\Bitrix\Main\File\Internal\FileHashTable

См. определение в файле filehash.php строка 447

◆ getLastKey()

static getLastKey (   $bucketId)
static

Returns last stored key for given bucket.

Аргументы
integer$bucketIdClouds storage bucket identifier.
Возвращает
string

См. определение в файле filehash.php строка 287

◆ getMap()

static getMap ( )
static

Returns entity map definition.

Возвращает
array

См. определение в файле filehash.php строка 52

◆ getTableName()

static getTableName ( )
static

Returns DB table name for entity.

Возвращает
string

См. определение в файле filehash.php строка 42

◆ prepareDuplicates()

static prepareDuplicates (   $bucketId,
$fileIds 
)
static

Checks candidates from file duplicates delete. Returns future file original identifier.

Аргументы
integer$bucketIdClouds storage bucket identifier.
array&$fileIdsArray of file identifiers candidates for duplicate delete.
Возвращает
false|integer

См. определение в файле filehash.php строка 559

◆ syncEnd()

static syncEnd (   $bucketId,
  $path,
  $prevLastKey 
)
static

Sync file hashes to the database. Removes all keys beyond the $prevLastKey.

Аргументы
integer$bucketIdClouds storage bucket identifier.
string$pathFile list relative path.
string$prevLastKeyLast key returned by last call to CCloudStorageBucket::ListFiles.
Возвращает
null|Main\DB\Result
См. также
\Bitrix\Clouds\FileHashTable::syncList

См. определение в файле filehash.php строка 244

◆ syncList()

static syncList (   $bucketId,
  $path,
array  $files,
  $prevLastKey 
)
static

Sync file hashes to the database. Adds new keys and removes missing between $files[last_key] and $lastKey.

Аргументы
integer$bucketIdClouds storage bucket identifier.
string$pathFile list relative path.
array$filesFile list as it returned by CCloudStorageBucket::ListFiles.
string$prevLastKeyLast key returned by previous call to CCloudStorageBucket::ListFiles.
Возвращает
null|Main\DB\Result
См. также
CCloudStorageBucket::ListFiles

См. определение в файле filehash.php строка 159

◆ validateFileHash()

static validateFileHash ( )
static

Returns validators for FILE_HASH field.

Возвращает
array

См. определение в файле filehash.php строка 103

◆ validateFilePath()

static validateFilePath ( )
static

Returns validators for FILE_PATH field.

Возвращает
array

См. определение в файле filehash.php строка 91