OC_FileChunking

class OC_FileChunking
Source:lib/private/legacy/filechunking.php#32

Properties

protected static property OC_FileChunking::$info
Source:lib/private/legacy/filechunking.php#33
protected static property OC_FileChunking::$cache
Source:lib/private/legacy/filechunking.php#34
protected static property OC_FileChunking::$ttl
TTL of chunks
Source:lib/private/legacy/filechunking.php#41
Type:int

Methods

public static OC_FileChunking::decodeName($name)
Source:lib/private/legacy/filechunking.php#43
public OC_FileChunking::__construct($info)
Source:

lib/private/legacy/filechunking.php#51

Parameters:
  • $info (string[])
public OC_FileChunking::getPrefix()
Source:lib/private/legacy/filechunking.php#56
protected OC_FileChunking::getCache()
Source:lib/private/legacy/filechunking.php#63
public OC_FileChunking::store($index, $data)
Stores the given $data under the given $key - the number of stored bytes is returned
Source:

lib/private/legacy/filechunking.php#77

Parameters:
  • $index (string)
  • $data (resource)
Returns:

int

public OC_FileChunking::isComplete()
Source:lib/private/legacy/filechunking.php#85
public OC_FileChunking::assemble($f)
Assembles the chunks into the file specified by the path.
Chunks are deleted afterwards.
Source:

lib/private/legacy/filechunking.php#110

Parameters:
  • $f (resource) target path
Returns:

int assembled file size

Throws:

\OC\InsufficientStorageException when file could not be fully assembled due to lack of free space

public OC_FileChunking::getCurrentSize()
Returns the size of the chunks already present
Source:lib/private/legacy/filechunking.php#130
Returns:int size in bytes
public OC_FileChunking::cleanup()
Removes all chunks which belong to this transmission
Source:lib/private/legacy/filechunking.php#143
public OC_FileChunking::remove($index)
Removes one specific chunk
Source:

lib/private/legacy/filechunking.php#155

Parameters:
  • $index (string)
public OC_FileChunking::file_assemble($storage, $path)
Assembles the chunks into the file specified by the path.
Also triggers the relevant hooks and proxies.
Source:

lib/private/legacy/filechunking.php#171

Parameters:
Returns:

bool true on success or false if file could not be created

Throws:

\OC\ServerNotAvailableException