Methods |
public
|
__construct(AbstractModule $oModule = null)
|
#
|
public
|
getMinModuleDecorator(): CApiModuleDecorator
Returns Min module decorator.
Returns Min module decorator.
|
#
|
public
|
IsFileExists(int $UserId, int $Type, string $Path, string $Name): bool
Checks if file exists.
Parameters
$UserId |
Account object.
|
$Type |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$Path |
Path to the folder which contains the file, empty string means the file is in the root folder.
|
$Name |
Filename.
|
|
#
|
public
|
getFileInfo(int $iUserId, string $sType, string $sPath, string $sName): FileItem
Retrieves array of metadata on the specific file.
Retrieves array of metadata on the specific file.
Parameters
$iUserId |
Account object
|
$sType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder which contains the file, empty string means the file is in the root folder.
|
$sName |
Filename.
|
|
#
|
public
|
getDirectoryInfo(int $iUserId, int $iType, string $sPath): FileItem
Retrieves array of metadata on the specific directory.
Retrieves array of metadata on the specific directory.
Parameters
$iUserId |
Account object
|
$iType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder.
|
|
#
|
public
|
getDirectory(int $iUserId, int $iType): FileItem
Retrieves object on the specific directory.
Retrieves object on the specific directory.
Parameters
$iUserId |
Account object
|
$iType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
|
#
|
public
|
getFile(int $iUserId, int $iType, string $sPath, string $sName, $iOffset = 0, $iChunkSize = 0): resource|bool
Allows for reading contents of the file.
Allows for reading contents of the file.
Parameters
$iUserId |
Account object
|
$iType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder which contains the file, empty string means the file is in the root folder.
|
$sName |
Filename.
|
|
#
|
public
|
createPublicLink(int $iUserId, int $iType, string $sPath, string $sName, string $sSize, string $bIsFolder): string|bool
Creates public link for specific file or folder.
Creates public link for specific file or folder.
Parameters
$iType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder.
|
$sName |
Filename.
|
$sSize |
Size information, it will be displayed when recipient opens the link.
|
$bIsFolder |
If true, it is assumed the link is created for a folder, false otherwise.
|
|
#
|
public
|
deletePublicLink(int $iUserId, int $iType, string $sPath, string $sName): bool
Removes public link created for specific file or folder.
Removes public link created for specific file or folder.
Parameters
$iType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder.
|
$sName |
Filename.
|
|
#
|
public
|
getFiles(
int $iUserId,
string $sType,
string $sPath,
string $sPattern = '',
string $sPublicHash = null,
$bIsShared = false,
): array|bool
Performs search for files.
Performs search for files.
Parameters
$sType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder.
|
$sPattern |
Search string.
|
$sPublicHash |
Public hash.
|
Returns
array of \Aurora\Modules\Files\Classes\FileItem.
|
#
|
public
|
createFolder(int $iUserId, int $iType, string $sPath, string $sFolderName): bool
Creates a new folder.
Parameters
$iType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the parent folder, empty string means top-level folder is created.
|
$sFolderName |
Folder name.
|
|
#
|
public
|
createFile(
int $iUserId,
int $iType,
string $sPath,
string $sFileName,
$mData,
bool $bOverride = true,
$rangeType = 0,
$offset = 0,
$extendedProps = [],
): bool
Creates a new file.
Parameters
$iUserId |
Account object
|
$iType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder which contains the file, empty string means the file is created in the root folder.
|
$sFileName |
Filename.
|
$bOverride |
If true, existing file with that name will be overwritten.
|
|
#
|
public
|
createLink(int $iUserId, int $iType, string $sPath, string $sLink, string $sName): bool
Creates a link to arbitrary online content.
Creates a link to arbitrary online content.
Parameters
$iUserId |
Account object
|
$iType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder which contains the link.
|
$sLink |
URL of the item to be linked.
|
$sName |
Name of the link.
|
|
#
|
public
|
delete(int $iUserId, int $iType, string $sPath, string $sName): bool
Removes file or folder.
Parameters
$iUserId |
Account object
|
$iType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder which contains the file, empty string means the file is in the root folder.
|
$sName |
Filename.
|
|
#
|
public
|
rename(int $iUserId, int $iType, string $sPath, string $sName, string $sNewName, bool $bIsLink): bool
Renames file or folder.
Parameters
$iUserId |
Account object
|
$iType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder which contains the file, empty string means the file is in the root folder.
|
$sName |
Name of file or folder.
|
$sNewName |
New name.
|
|
#
|
public
|
move(
int $iUserId,
int $iFromType,
int $iToType,
string $sFromPath,
string $sToPath,
string $sName,
string $sNewName,
): bool
Move file or folder to a different location. In terms of Aurora, item can be moved to a different storage as well.
Move file or folder to a different location. In terms of Aurora, item can be moved to a different storage as well.
Parameters
$iUserId |
Account object
|
$iFromType |
Source storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$iToType |
Destination storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sFromPath |
Path to the folder which contains the item.
|
$sToPath |
Destination path of the item.
|
$sName |
Current name of file or folder.
|
$sNewName |
New name of the item.
|
|
#
|
public
|
copy(
int $iUserId,
int $iFromType,
int $iToType,
string $sFromPath,
string $sToPath,
string $sName,
string $sNewName = null,
$bMove = false,
): bool
Copies file or folder, optionally renames it.
Copies file or folder, optionally renames it.
Parameters
$iUserId |
Account object
|
$iFromType |
Source storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$iToType |
Destination storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sFromPath |
Path to the folder which contains the item.
|
$sToPath |
Destination path of the item.
|
$sName |
Current name of file or folder.
|
$sNewName |
New name of the item.
|
|
#
|
public
|
getUserSpaceUsed(int $iUserId, string $aTypes = [FileStorageType::Personal])
Returns space used by the user in specified storages, in bytes.
Returns space used by the user in specified storages, in bytes.
Parameters
$iUserId |
User identifier.
|
$aTypes |
Storage type list. Accepted values in array: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
|
#
|
public
|
getNonExistentFileName(int $iUserId, int $iType, string $sPath, string $sFileName, $bWithoutGroup = false): string
Allows for obtaining filename which doesn't exist in current directory. For example, if you need to store **data.txt**…
Allows for obtaining filename which doesn't exist in current directory. For example, if you need to store data.txt file but it already exists, this method will return data_1.txt, or data_2.txt if that one already exists, and so on.
Parameters
$iUserId |
Account object
|
$iType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder which contains the file, empty string means the file is in the root folder.
|
$sFileName |
Filename.
|
|
#
|
public
|
ClearFiles(string $sPublicId)
|
#
|
public
|
updateExtendedProps(string $sUserPublicId, string $sType, string $sPath, string $sName, $aExtendedProps): bool
Parameters
$sType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder which contains the file, empty string means the file is in the root folder.
|
$sName |
Filename.
|
|
#
|
public
|
getExtendedProps(string $sUserPublicId, string $sType, string $sPath, string $sName): bool
Parameters
$sType |
Storage type. Accepted values: \Aurora\System\Enums\FileStorageType::Personal, \Aurora\System\Enums\FileStorageType::Corporate, \Aurora\System\Enums\FileStorageType::Shared.
|
$sPath |
Path to the folder which contains the file, empty string means the file is in the root folder.
|
$sName |
Filename.
|
|
#
|