Protected Attributes | |
$targetFolder | |
string | $copyOptions |
string | $sourceFileName |
Protected Attributes inherited from ExistingFile | |
$resourceType | |
$folder | |
$errors = [] | |
$metadata | |
$backend | |
Protected Attributes inherited from File | |
$fileName | |
$config | |
$app | |
Additional Inherited Members | |
Static Public Member Functions inherited from File | |
static | isValidName ($fileName, $disallowUnsafeCharacters=true) |
static | secureName ($fileName, $disallowUnsafeCharacters=true, $forceAscii=false) |
static | convertToAscii ($str) |
Public Attributes inherited from File | |
const | NO_EXTENSION = 'NO_EXT' |
The CopiedFile class.
Represents a copied file.
__construct | ( | $fileName, | |
$folder, | |||
ResourceType | $resourceType, | ||
CKFinder | $app | ||
) |
Constructor.
string | $fileName | source file name |
string | $folder | copied source file resource type relative path |
ResourceType | $resourceType | source file resource type |
CKFinder | $app | CKFinder |
Reimplemented from ExistingFile.
Reimplemented in MovedFile.
autorename | ( | Backend | $backend = null , |
$path = '' |
|||
) |
Renames the current file by adding a number to the file name.
Renaming is done by adding a number in parenthesis provided that the file name does not collide with any other file existing in the target backend/path. For example, if the target backend path contains a file named foo.txt
and the current file name is foo.txt
, this method will change the current file name to foo(1).txt
.
Backend | $backend | target backend |
string | $path | target backend-relative path |
true
if file was renamedmixed | $path |
Reimplemented from File.
doCopy | ( | ) |
Copies the current file.
true
if the file was copied successfullyException
getSourceFilename | ( | ) |
Returns the source file name of the copied file.
getSourceFilePath | ( | ) |
Returns the source file name of the copied file.
getTargetFilename | ( | ) |
Returns the target file name of the copied file.
getTargetFilePath | ( | ) |
Returns the target path of the copied file.
getTargetFolder | ( | ) |
Returns the target folder for a copied file.
hasAllowedExtension | ( | ) |
Checks if the file has an extension allowed in both source and target ResourceTypes.
true
if the file has an extension allowed in source and target directories Reimplemented from ExistingFile.
hasAllowedSize | ( | ) |
Checks if the copied file size does not exceed the file size limit set for the target folder.
FilesystemException |
isValid | ( | ) |
Validates the copied file.
true
if the copied file is valid and ready to be copiedFilesystemException | |
Exception
setCopyOptions | ( | string | $copyOptions | ) |
Sets copy options.
|
protected |
File name of the source file.