apps/encryption/lib/Crypto/EncryptAll.php
/**
	 * encrypt files from the given user
	 *
	 * @param string $uid
	 * @param ProgressBar $progress
	 * @param string $userCount
	 */
encrypt files from the given user
@param string $uid
@param ProgressBar $progress
@param string $userCount
encrypt files from the given user @param string $uid @param ProgressBar $progress @param string $userCount
protected function encryptUsersFiles($uid, ProgressBar $progress, $userCount) {
		$this->setupUserFS($uid);
		$directories = array();
		$directories[] =  '/' . $uid . '/files';
		while($root = array_pop($directories)) {
			$content = $this->rootView->getDirectoryContent($root);
			foreach ($content as $file) {
				$path = $root . '/' . $file['name'];
				if ($this->rootView->is_dir($path)) {
					$directories[] = $path;
					continue;
				} else {
					$progress->setMessage("encrypt files for user $userCount: $path");
					$progress->advance();
					if($this->encryptFile($path) === false) {
						$progress->setMessage("encrypt files for user $userCount: $path (already encrypted)");
						$progress->advance();
					}
				}
			}
		}
	}
protected function encryptUsersFiles ( $ uid , ProgressBar $ progress , $ userCount ) { $ this -> setupUserFS ( $ uid ) ; $ directories = array ( ) ; $ directories [ ] = '/' . $ uid . '/files' ; while ( $ root = array_pop ( $ directories ) ) { $ content = $ this -> rootView -> getDirectoryContent ( $ root ) ; foreach ( $ content as $ file ) { $ path = $ root . '/' . $ file [ 'name' ] ; if ( $ this -> rootView -> is_dir ( $ path ) ) { $ directories [ ] = $ path ; continue ; } else { $ progress -> setMessage ( " encrypt files for user  $ userCount :  $ path " ) ; $ progress -> advance ( ) ; if ( $ this -> encryptFile ( $ path ) === false ) { $ progress -> setMessage ( " encrypt files for user  $ userCount :  $ path  (already encrypted) " ) ; $ progress -> advance ( ) ; } } } } }
encrypt files from the given user
 @param string $uid
 @param ProgressBar $progress
 @param string $userCount
encrypt files from the given user @param string $uid @param ProgressBar $progress @param string $userCount