1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс CFile

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

static SaveForDB (&$arFields, $field, $strSavePath)
static checkForDb ($arFields, $field)
static SaveFile ($arFile, $strSavePath, $forceRandom=false, $skipExtension=false, $dirAdd='')
static FindDuplicate ($size, $hash, $handlerId=null)
static AddDuplicate ($originalId, $duplicateId=null, bool $resolvePossibleOriginCycle=true)
static DeleteDuplicates ($originalId, array $duplicteIds)
static CloneFile (int $fileId)
static DoInsert ($arFields)
static Delete ($ID)
static AddVersion ($originalId, $versionId, $metaData=[])
static CleanCache ($fileId)
static GetFromCache ($fileId, $realId=false)
static GetByID ($fileId, $realId=false)
static GetList ($arOrder=[], $arFilter=[])
static GetFileSRC ($file, $uploadDir=false, $external=true)
static GetFileArray ($fileId, $uploadDir=false)
static ConvertFilesToPost ($source, &$target, $field=false)
static CopyFile ($FILE_ID, $bRegister=true, $newPath="")
static UpdateDesc ($ID, $desc)
static UpdateExternalId ($ID, $external_id)
static InputFile ($strFieldName, $int_field_size, $strImageID, $strImageStorePath=false, $int_max_file_size=0, $strFileType="IMAGE", $field_file="class=typefile", $description_size=0, $field_text="class=typeinput", $field_checkbox="", $bShowNotes=true, $bShowFilePath=true)
static FormatSize ($size, $precision=2)
static GetImageExtensions ()
static GetFlashExtensions ()
static IsImage ($filename, $mime_type=false)
static CheckImageFile ($arFile, $iMaxSize=0, $iMaxWidth=0, $iMaxHeight=0, $access_typies=[], $bForceMD5=false, $bSkipExt=false)
static CheckFile ($arFile, $intMaxSize=0, $mimeType=false, $strExt=false, $bForceMD5=false, $bSkipExt=false)
static ShowFile ($iFileID, $max_file_size=0, $iMaxW=0, $iMaxH=0, $bPopup=false, $sParams=false, $sPopupTitle=false, $iSizeWHTTP=0, $iSizeHHTTP=0)
static DisableJSFunction ($b=true)
static OutputJSImgShw ()
static _GetImgParams ($strImage, $iSizeWHTTP=0, $iSizeHHTTP=0)
static GetPath ($img_id)
static ShowImage ($strImage, $iMaxW=0, $iMaxH=0, $sParams=null, $strImageUrl="", $bPopup=false, $sPopupTitle=false, $iSizeWHTTP=0, $iSizeHHTTP=0, $strImageUrlTemplate="")
static Show2Images ($strImage1, $strImage2, $iMaxW=0, $iMaxH=0, $sParams=false, $sPopupTitle=false, $iSizeWHTTP=0, $iSizeHHTTP=0)
static MakeFileArray ($path, $mimetype=false, $skipInternal=false, $external_id="")
static GetTempName ($dir_name=false, $file_name='')
static ChangeSubDir ($module_id, $old_subdir, $new_subdir)
static ResizeImage (&$arFile, $arSize, $resizeType=BX_RESIZE_IMAGE_PROPORTIONAL)
static ResizeImageDeleteCache ($arFile)
static ResizeImageGet ($file, $arSize, $resizeType=BX_RESIZE_IMAGE_PROPORTIONAL, $bInitSizes=false, $arFilters=false, $bImmediate=false, $jpgQuality=false)
static ImageCreateFromBMP ($filename)
static ScaleImage ($sourceImageWidth, $sourceImageHeight, $arSize, $resizeType, &$bNeedCreatePicture, &$arSourceSize, &$arDestinationSize)
static IsGD2 ()
static ResizeImageFile ($sourceFile, $destinationFile, $arSize, $resizeType=BX_RESIZE_IMAGE_PROPORTIONAL, $arWaterMark=[], $quality=false, $arFilters=false)
static ApplyImageFilter ($picture, $arFilter)
static ImageFlipHorizontal ($picture)
static ImageHandleOrientation ($orientation, $sourceImage)
static Watermark ($obj, $Params)
static WatermarkText ($obj, $Params=[])
static WatermarkImage ($obj, $Params=[])
static ImageRotate ($sourceFile, $angle)
static CreateImage ($path)
static ExtractImageExif ($src)
static NormalizeContentType ($contentType)
static GetContentType ($path, $bPhysicalName=false)
static GetImageSize ($path, $bPhysicalName=false, $flashEnabled=false)
static DeleteHashAgent ()

Защищенные статические члены

static transformName ($name, $forceRandom=false, $bSkipExt=false)
static validateFile ($strFileName, $arFile)
static CalculateHash ($file, $size)
static processDuplicates ($ID)
static processVersions ($ID)
static GetFromDb ($fileId, $realId)

Защищенные данные

const CACHE_DIR = 'b_file'
const DELETE_NONE = 0x00
const DELETE_FILE = 0x01
const DELETE_DB = 0x02
const DELETE_ALL = 0x03

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

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

Методы

◆ _GetImgParams()

_GetImgParams ( $strImage,
$iSizeWHTTP = 0,
$iSizeHHTTP = 0 )
static

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

◆ AddDuplicate()

AddDuplicate ( $originalId,
$duplicateId = null,
bool $resolvePossibleOriginCycle = true )
static

Adds information about a duplicate file. For internal use only.

Аргументы
int$originalIdOriginal file ID.
int | null$duplicateIdDuplicate file ID (optional if the original and duplicate files are the same).
bool$resolvePossibleOriginCycleCheck if the desired original file is already in the table and if it's a duplicate of another file, then use the real original file ID from the table.

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

◆ AddVersion()

AddVersion ( $originalId,
$versionId,
$metaData = [] )
static

Adds information about a version of a file.

Аргументы
int$originalIdOriginal file ID.
int$versionIdVersion file ID.
array$metaDataThe version peculiarities.

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

◆ ApplyImageFilter()

ApplyImageFilter ( $picture,
$arFilter )
static
Аргументы
$picture
$arFilter
Возвращает
bool

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

◆ CalculateHash()

CalculateHash ( $file,
$size )
staticprotected

Calculates a hash of the file.

Аргументы
string$fileFull path to the file.
int$sizeSize of the file.
Возвращает
string

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

◆ ChangeSubDir()

ChangeSubDir ( $module_id,
$old_subdir,
$new_subdir )
static

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

◆ CheckFile()

CheckFile ( $arFile,
$intMaxSize = 0,
$mimeType = false,
$strExt = false,
$bForceMD5 = false,
$bSkipExt = false )
static

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

◆ checkForDb()

checkForDb ( $arFields,
$field )
static

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

◆ CheckImageFile()

CheckImageFile ( $arFile,
$iMaxSize = 0,
$iMaxWidth = 0,
$iMaxHeight = 0,
$access_typies = [],
$bForceMD5 = false,
$bSkipExt = false )
static

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

◆ CleanCache()

CleanCache ( $fileId)
static

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

◆ CloneFile()

CloneFile ( int $fileId)
static

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

◆ ConvertFilesToPost()

ConvertFilesToPost ( $source,
& $target,
$field = false )
static

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

◆ CopyFile()

CopyFile ( $FILE_ID,
$bRegister = true,
$newPath = "" )
static
См. также
CFile::CloneFile()

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

◆ CreateImage()

CreateImage ( $path)
static
Аргументы
string$path
Возвращает
false|resource

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

◆ Delete()

Delete ( $ID)
static

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

◆ DeleteDuplicates()

DeleteDuplicates ( $originalId,
array $duplicteIds )
static

Adds information about a duplicate file.

Аргументы
int$originalIdOriginal file ID.
array$duplicteIdsList of file IDs to delete and update their path to the original file path.

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

◆ DeleteHashAgent()

DeleteHashAgent ( )
static

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

◆ DisableJSFunction()

DisableJSFunction ( $b = true)
static

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

◆ DoInsert()

DoInsert ( $arFields)
static

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

◆ ExtractImageExif()

ExtractImageExif ( $src)
static
Аргументы
$src
Возвращает
array

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

◆ FindDuplicate()

FindDuplicate ( $size,
$hash,
$handlerId = null )
static
Аргументы
int$size
string$hash
int | null$handlerId
Возвращает
Internal\EO_FileHash|null

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

◆ FormatSize()

FormatSize ( $size,
$precision = 2 )
static
Аргументы
float$size
int$precision
Возвращает
string

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

◆ GetByID()

GetByID ( $fileId,
$realId = false )
static

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

◆ GetContentType()

GetContentType ( $path,
$bPhysicalName = false )
static

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

◆ GetFileArray()

GetFileArray ( $fileId,
$uploadDir = false )
static

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

◆ GetFileSRC()

GetFileSRC ( $file,
$uploadDir = false,
$external = true )
static

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

◆ GetFlashExtensions()

GetFlashExtensions ( )
static

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

◆ GetFromCache()

GetFromCache ( $fileId,
$realId = false )
static

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

◆ GetFromDb()

GetFromDb ( $fileId,
$realId )
staticprotected

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

◆ GetImageExtensions()

GetImageExtensions ( )
static

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

◆ GetImageSize()

GetImageSize ( $path,
$bPhysicalName = false,
$flashEnabled = false )
static
Аргументы
string$path
bool$bPhysicalName
bool$flashEnabled
Возвращает
array|false

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

◆ GetList()

GetList ( $arOrder = [],
$arFilter = [] )
static

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

◆ GetPath()

GetPath ( $img_id)
static

Retuns the path from the root by a file ID.

Аргументы
int$img_idFile ID
Возвращает
string|null

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

◆ GetTempName()

GetTempName ( $dir_name = false,
$file_name = '' )
static

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

◆ ImageCreateFromBMP()

ImageCreateFromBMP ( $filename)
static
Аргументы
$filename
Возвращает
false|resource

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

◆ ImageFlipHorizontal()

ImageFlipHorizontal ( $picture)
static
Аргументы
$picture

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

◆ ImageHandleOrientation()

ImageHandleOrientation ( $orientation,
$sourceImage )
static
Аргументы
$orientation
$sourceImage
Возвращает
false|resource

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

◆ ImageRotate()

ImageRotate ( $sourceFile,
$angle )
static

Reads an image from a file, rotates it clockwise, and saves it to the same file.

Аргументы
string$sourceFile
float$angle
Возвращает
bool

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

◆ InputFile()

InputFile ( $strFieldName,
$int_field_size,
$strImageID,
$strImageStorePath = false,
$int_max_file_size = 0,
$strFileType = "IMAGE",
$field_file = "class=typefile",
$description_size = 0,
$field_text = "class=typeinput",
$field_checkbox = "",
$bShowNotes = true,
$bShowFilePath = true )
static

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

◆ IsGD2()

IsGD2 ( )
static
Возвращает
bool

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

◆ IsImage()

IsImage ( $filename,
$mime_type = false )
static

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

◆ MakeFileArray()

MakeFileArray ( $path,
$mimetype = false,
$skipInternal = false,
$external_id = "" )
static

Returns an array describing file as if it was $_FILES element.

Аргументы
string | int$pathMay contain ID of the file, absolute path, relative path or an url.
string | bool$mimetypeForces type field of the array
bool$skipInternalExcludes using ID as $path
string$external_id
Возвращает
array|bool|null

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

◆ NormalizeContentType()

NormalizeContentType ( $contentType)
static
Аргументы
$contentType
Возвращает
string

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

◆ OutputJSImgShw()

OutputJSImgShw ( )
static

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

◆ processDuplicates()

processDuplicates ( $ID)
staticprotected

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

◆ processVersions()

processVersions ( $ID)
staticprotected

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

◆ ResizeImage()

ResizeImage ( & $arFile,
$arSize,
$resizeType = BX_RESIZE_IMAGE_PROPORTIONAL )
static

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

◆ ResizeImageDeleteCache()

ResizeImageDeleteCache ( $arFile)
static

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

◆ ResizeImageFile()

ResizeImageFile ( $sourceFile,
$destinationFile,
$arSize,
$resizeType = BX_RESIZE_IMAGE_PROPORTIONAL,
$arWaterMark = [],
$quality = false,
$arFilters = false )
static

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

◆ ResizeImageGet()

ResizeImageGet ( $file,
$arSize,
$resizeType = BX_RESIZE_IMAGE_PROPORTIONAL,
$bInitSizes = false,
$arFilters = false,
$bImmediate = false,
$jpgQuality = false )
static

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

◆ SaveFile()

SaveFile ( $arFile,
$strSavePath,
$forceRandom = false,
$skipExtension = false,
$dirAdd = '' )
static

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

◆ SaveForDB()

SaveForDB ( & $arFields,
$field,
$strSavePath )
static

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

◆ ScaleImage()

ScaleImage ( $sourceImageWidth,
$sourceImageHeight,
$arSize,
$resizeType,
& $bNeedCreatePicture,
& $arSourceSize,
& $arDestinationSize )
static
Аргументы
$sourceImageWidth
$sourceImageHeight
$arSize
$resizeType
$bNeedCreatePicture
$arSourceSize
$arDestinationSize

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

◆ Show2Images()

Show2Images ( $strImage1,
$strImage2,
$iMaxW = 0,
$iMaxH = 0,
$sParams = false,
$sPopupTitle = false,
$iSizeWHTTP = 0,
$iSizeHHTTP = 0 )
static

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

◆ ShowFile()

ShowFile ( $iFileID,
$max_file_size = 0,
$iMaxW = 0,
$iMaxH = 0,
$bPopup = false,
$sParams = false,
$sPopupTitle = false,
$iSizeWHTTP = 0,
$iSizeHHTTP = 0 )
static

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

◆ ShowImage()

ShowImage ( $strImage,
$iMaxW = 0,
$iMaxH = 0,
$sParams = null,
$strImageUrl = "",
$bPopup = false,
$sPopupTitle = false,
$iSizeWHTTP = 0,
$iSizeHHTTP = 0,
$strImageUrlTemplate = "" )
static

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

◆ transformName()

transformName ( $name,
$forceRandom = false,
$bSkipExt = false )
staticprotected

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

◆ UpdateDesc()

UpdateDesc ( $ID,
$desc )
static

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

◆ UpdateExternalId()

UpdateExternalId ( $ID,
$external_id )
static

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

◆ validateFile()

validateFile ( $strFileName,
$arFile )
staticprotected

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

◆ Watermark()

Watermark ( $obj,
$Params )
static
Аргументы
$obj
$Paramstype - text|image size - big|medium|small|real, for custom resizing can be used 'coefficient', real - only for images position - of the watermark on picture can be in one of two available notifications: tl|tc|tr|ml|mc|mr|bl|bc|br or topleft|topcenter|topright|centerleft|center|centerright|bottomleft|bottomcenter|bottomright
Возвращает
array|bool

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

◆ WatermarkImage()

WatermarkImage ( $obj,
$Params = [] )
static

Creates watermark from image.

Аргументы
$obj
array$Paramsfile - abs path to file alpha_level - opacity position - of the watermark
Возвращает
bool

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

◆ WatermarkText()

WatermarkText ( $obj,
$Params = [] )
static
Аргументы
$obj
array$Params
Возвращает
bool

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

Поля

◆ CACHE_DIR

const CACHE_DIR = 'b_file'
protected

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

◆ DELETE_ALL

const DELETE_ALL = 0x03
protected

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

◆ DELETE_DB

const DELETE_DB = 0x02
protected

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

◆ DELETE_FILE

const DELETE_FILE = 0x01
protected

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

◆ DELETE_NONE

const DELETE_NONE = 0x00
protected

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


Объявления и описания членов класса находятся в файле:
  • C:/bitrix/modules/main/classes/general/file.php