!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/dnoegel/php-xdg-base-dir/src/   drwxr-xr-x
Free 116.92 GB of 200.55 GB (58.3%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Xdg.php (2.86 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace XdgBaseDir;

/**
 * Simple implementation of the XDG standard http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
 *
 * Based on the python implementation https://github.com/takluyver/pyxdg/blob/master/xdg/BaseDirectory.py
 *
 * Class Xdg
 * @package ShopwareCli\Application
 */
class Xdg
{
    const 
S_IFDIR 040000// directory
    
const S_IRWXO 00007;  // rwx other
    
const S_IRWXG 00056;  // rwx group
    
const RUNTIME_DIR_FALLBACK 'php-xdg-runtime-dir-fallback-';

    
/**
     * @return string
     */
    
public function getHomeDir()
    {
        return 
getenv('HOME') ?: (getenv('HOMEDRIVE') . DIRECTORY_SEPARATOR getenv('HOMEPATH'));
    }

    
/**
     * @return string
     */
    
public function getHomeConfigDir()
    {
        
$path getenv('XDG_CONFIG_HOME') ?: $this->getHomeDir() . DIRECTORY_SEPARATOR '.config';

        return 
$path;
    }

    
/**
     * @return string
     */
    
public function getHomeDataDir()
    {
        
$path getenv('XDG_DATA_HOME') ?: $this->getHomeDir() . DIRECTORY_SEPARATOR '.local' DIRECTORY_SEPARATOR 'share';

        return 
$path;
    }

    
/**
     * @return array
     */
    
public function getConfigDirs()
    {
        
$configDirs getenv('XDG_CONFIG_DIRS') ? explode(':'getenv('XDG_CONFIG_DIRS')) : array('/etc/xdg');

        
$paths array_merge(array($this->getHomeConfigDir()), $configDirs);

        return 
$paths;
    }

    
/**
     * @return array
     */
    
public function getDataDirs()
    {
        
$dataDirs getenv('XDG_DATA_DIRS') ? explode(':'getenv('XDG_DATA_DIRS')) : array('/usr/local/share''/usr/share');

        
$paths array_merge(array($this->getHomeDataDir()), $dataDirs);

        return 
$paths;
    }

    
/**
     * @return string
     */
    
public function getHomeCacheDir()
    {
        
$path getenv('XDG_CACHE_HOME') ?: $this->getHomeDir() . DIRECTORY_SEPARATOR '.cache';

        return 
$path;

    }

    public function 
getRuntimeDir($strict=true)
    {
        if (
$runtimeDir getenv('XDG_RUNTIME_DIR')) {
            return 
$runtimeDir;
        }

        if (
$strict) {
            throw new \
RuntimeException('XDG_RUNTIME_DIR was not set');
        }

        
$fallback sys_get_temp_dir() . DIRECTORY_SEPARATOR self::RUNTIME_DIR_FALLBACK getenv('USER');

        
$create false;

        if (!
is_dir($fallback)) {
            
mkdir($fallback0700true);
        }

        
$st lstat($fallback);

        
# The fallback must be a directory
        
if (!$st['mode'] & self::S_IFDIR) {
            
rmdir($fallback);
            
$create true;
        } elseif (
$st['uid'] != getmyuid() ||
            
$st['mode'] & (self::S_IRWXG self::S_IRWXO)
        ) {
            
rmdir($fallback);
            
$create true;
        }

        if (
$create) {
            
mkdir($fallback0700true);
        }

        return 
$fallback;
    }

}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0106 ]--