PHP code example of modevsome / mofilesmanager

1. Go to this page and download the library: Download modevsome/mofilesmanager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

modevsome / mofilesmanager example snippets


// Handle a folder
$folder_object = new moFilesManager\Folder( $folder_path );

// Handle a file
$file_object = new moFilesManager\File( $file_path );

$folder_object = new moFilesManager\Folder( $folder_path );

$folder_object->setPath( $new_folder_path );

$folder_object->create();

$folder_object->copy(string $copy_path, $replace);

$folder_object->rename(string $new_name, $replace);

$folder_object->move(string $new_path, $replace);

$folder_object->drain();

$folder_object->delete();

$folder_object->zip(string $archive_path = '', $replace, $options);

$folder_object->unzip(string $archive_path = '', $replace);

$file_object = new moFilesManager\File( $file_path );

$file_object->setPath( $new_file_path );

$file_object->getContent();

$file_object->setContent(string $content);

$file_object->addContent(string $content, bool $prepend = FALSE);

$file_object->write(bool $replace);

$file_object->copy(string $copy_path, bool $replace);

$file_object->rename(string $new_name, bool $replace);

$file_object->move(string $new_path, bool $replace);

$file_object->delete();

$file_object->upload($tmp_name, $replace, $allowed_types, $max_size);

$file_object->getStream($fopenMode, $forceFolderCreation);

moFilesManager\moFilesManager::setDebugState(bool $state);

moFilesManager\moFilesManager::getDebugState();

moFilesManager\moFilesManager::getLogs();

moFilesManager\moFilesManager::getLastLog();

moFilesManager\moFilesManager::formatPath(string $path);
cli
cd [YOUR APP PATH]\vendor\modevsome\mofilesmanager\tests
php run.php