Nextcloud PHP API (master)

IImportSource

Tags
since
24.0.0

Table of Contents

Constants

PATH_USER  = 'user.json'

Methods

close()  : void
Called after import is complete
copyToFolder()  : void
Copy files from the export to a Folder
getFileAsStream()  : resource
Reads a file from the export as a stream
getFileContents()  : string
Reads a file from the export
getFolderListing()  : array<string|int, mixed>
List the files of a folder
getMigratorVersion()  : int|null
getMigratorVersions()  : array<string, int>
getOriginalUid()  : string
Get original uid of the imported account
pathExists()  : bool
Test if a path exists, which may be a file or a folder

Constants

PATH_USER

public mixed PATH_USER = 'user.json'
Tags
since
24.0.0

Methods

copyToFolder()

Copy files from the export to a Folder

public copyToFolder(Folder $destination, string $sourcePath) : void

Folder $destination folder to copy into string $sourcePath path in the export archive

Parameters
$destination : Folder
$sourcePath : string
Tags
throws
UserMigrationException
since
24.0.0

getFileAsStream()

Reads a file from the export as a stream

public getFileAsStream(string $path) : resource
Parameters
$path : string

Full path to the file in the export archive.

Tags
throws
UserMigrationException
since
24.0.0
Return values
resource

A stream resource to read from to get the file content.

getFileContents()

Reads a file from the export

public getFileContents(string $path) : string
Parameters
$path : string

Full path to the file in the export archive.

Tags
throws
UserMigrationException
since
24.0.0
Return values
string

The full content of the file.

getFolderListing()

List the files of a folder

public getFolderListing(string $path) : array<string|int, mixed>
Parameters
$path : string

Full path to the folder in the export archive.

Tags
throws
UserMigrationException
since
24.0.0
Return values
array<string|int, mixed>

The list of files.

getMigratorVersion()

public getMigratorVersion(string $migrator) : int|null
Parameters
$migrator : string

Migrator id (as returned by IMigrator::getId)

Tags
throws
UserMigrationException
since
24.0.0
Return values
int|null

Version for this migrator from the export archive. Null means migrator missing.

getMigratorVersions()

public getMigratorVersions() : array<string, int>
Tags
throws
UserMigrationException
since
24.0.0
Return values
array<string, int>

Migrators and their versions from the export archive.

pathExists()

Test if a path exists, which may be a file or a folder

public pathExists(string $path) : bool
Parameters
$path : string
Tags
throws
UserMigrationException
since
24.0.0
Return values
bool

        
On this page

Search results