niktux / khameleon Goto Github PK
View Code? Open in Web Editor NEWKhameleon
Khameleon
$dir = $fs->putDirectory('path/to/newdir');
$file = $dir->putFile('newfile');
echo $file->getPath(); // prints <rootDir>/path/to/newdir/newfile
// idea
$fs = new CachedFileSystem(
new Memcache\FileSystem(),
new Local\FileSystem()
);
$fs->setConfig(new CacheConfiguration(/* ... */);
Ideas : traits (php 5.4+) or strategy pattern
Will enhance algorithms with better polypmorphism use
$link = $fs->putSymlink('path/to/mylink', 'path/to/target');
$fs->createLink('path/to/mylink', 'path/to/target');
// creates path/to/linkName
$fs->link($fileObject, 'path/to/linkName');
// creates path/to/existingDir/<targetName>
$fs->link($fileObject, 'path/to/existingDir');
$link = $dir->putSymlink('linkName', 'path/to/target');
$dir->link($targetObject, 'optionalLinkName');
$dir->link($targetObject);
$dir = $fs->get('path/to/dir');
$iterator = $dir->recursiveSearch('~.ini$~');
$dir = $this->fs->get('path/to/dir');
$nearestChildren = new DepthLimitIterator($dir, 2);
// create Memory FS from local FS
$memoryFs = new Memory\FileSystemDumper('path/to/dump');
$fs = new Composite\FileSystem(new Local\FileSystem());
$fs->mount('/cache', new Memcache\FileSystem());
$fs->mount('/data/shared', new Database\FileSystem());
All paths will go to local FS except :
$dir = $fs->get('path/to/dir');
$iterator = $dir->search('~.ini$~');
/**
* Remove recursively a directory
*
* @param string path
* @throws \Khameleon\Exceptions\RemovalException
* @throws \Khameleon\Exceptions\WrongNodeTypeException
* @throws \Khameleon\Exceptions\InvalidMountingPointException
*/
public function removeDirectory($path);
$dir = $fs->putDirectory('path/to/newdir');
$subdir = $dir->putDirectory('newsubdir');
echo $subdir->getPath(); // prints <rootDir>/path/to/newdir/newsubdir
Creation time
Modification time
Access time
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.