Skip to content

Commit

Permalink
Changed namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
stk2k committed Jun 5, 2021
1 parent a955c9a commit 131d10e
Show file tree
Hide file tree
Showing 32 changed files with 105 additions and 105 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ A simle file system classes
### making a file

```php
use FileTools\FileSystem;
use stk2k\filesystem\FileSystem;

FileSystem::put('/path/to/file', 'Hello, World');
```

### deleting a file

```php
use FileTools\FileSystem;
use stk2k\filesystem\FileSystem;

FileSystem::delete('/path/to/file');
```

### getting file's content

```php
use FileTools\FileSystem;
use stk2k\filesystem\FileSystem;

// getting whole content as string
$ret = FileSystem::get('/path/to/file');
Expand All @@ -53,8 +53,8 @@ print_r($ret);
### putting file's content

```php
use FileTools\File;
use FileTools\FileSystem;
use stk2k\filesystem\File;
use stk2k\filesystem\FileSystem;

// putting string content
$ret = FileSystem::put('/path/to/file', 'Hello, World!');
Expand Down Expand Up @@ -87,9 +87,9 @@ echo $ret->get(); // Hello, World!
### file object

```php
use FileTools\File;
use stk2k\filesystem\File;

$file = new File('/path/to/file');
$ret = new File('/path/to/file');
echo $ret->get();
```

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
},
"autoload": {
"psr-4": {
"Stk2k\\FileSystem\\": "src/"
"stk2k\\filesystem\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Stk2k\\FileSystem\\Test\\": "test/"
"stk2k\\filesystem\\test\\": "test/"
}
}
}
4 changes: 2 additions & 2 deletions src/Exception/FileCopyException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Exception;
namespace stk2k\filesystem\Exception;

use Throwable;

use Stk2k\FileSystem\File;
use stk2k\filesystem\File;

class FileCopyException extends FileSystemException
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/FileInputException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Exception;
namespace stk2k\filesystem\Exception;

use Throwable;

use Stk2k\FileSystem\File;
use stk2k\filesystem\File;

class FileInputException extends FileSystemException
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/FileIsNotReadableException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Exception;
namespace stk2k\filesystem\Exception;

use Throwable;

use Stk2k\FileSystem\File;
use stk2k\filesystem\File;

class FileIsNotReadableException extends FileSystemException
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/FileOpenException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Exception;
namespace stk2k\filesystem\Exception;

use Throwable;

use Stk2k\FileSystem\File;
use stk2k\filesystem\File;

class FileOpenException extends FileSystemException
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/FileOutputException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Exception;
namespace stk2k\filesystem\Exception;

use Throwable;

use Stk2k\FileSystem\File;
use stk2k\filesystem\File;

class FileOutputException extends FileSystemException
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/FileRenameException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Exception;
namespace stk2k\filesystem\Exception;

use Throwable;

use Stk2k\FileSystem\File;
use stk2k\filesystem\File;

class FileRenameException extends FileSystemException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/FileSystemException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Exception;
namespace stk2k\filesystem\Exception;

use Throwable;
use Exception;
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/FileSystemExceptionInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Exception;
namespace stk2k\filesystem\Exception;

interface FileSystemExceptionInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/MakeDirectoryException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Exception;
namespace stk2k\filesystem\Exception;

use Throwable;

use Stk2k\FileSystem\File;
use stk2k\filesystem\File;

class MakeDirectoryException extends FileSystemException
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/MakeFileException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Exception;
namespace stk2k\filesystem\Exception;

use Throwable;

use Stk2k\FileSystem\File;
use stk2k\filesystem\File;

class MakeFileException extends FileSystemException
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/NotDirectoryException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Exception;
namespace stk2k\filesystem\Exception;

use Throwable;

use Stk2k\FileSystem\File;
use stk2k\filesystem\File;

class NotDirectoryException extends FileSystemException
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/NotFileException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Exception;
namespace stk2k\filesystem\Exception;

use Throwable;

use Stk2k\FileSystem\File;
use stk2k\filesystem\File;

class NotFileException extends FileSystemException
{
Expand Down
12 changes: 6 additions & 6 deletions src/File.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem;
namespace stk2k\filesystem;

use Serializable;
use JsonSerializable;

use Stk2k\FileSystem\Exception\FileInputException;
use Stk2k\FileSystem\Exception\FileOutputException;
use Stk2k\FileSystem\Exception\FileRenameException;
use Stk2k\FileSystem\Exception\MakeFileException;
use Stk2k\FileSystem\Exception\MakeDirectoryException;
use stk2k\filesystem\Exception\FileInputException;
use stk2k\filesystem\Exception\FileOutputException;
use stk2k\filesystem\Exception\FileRenameException;
use stk2k\filesystem\Exception\MakeFileException;
use stk2k\filesystem\Exception\MakeDirectoryException;

class File
{
Expand Down
2 changes: 1 addition & 1 deletion src/FileFilterInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem;
namespace stk2k\filesystem;

interface FileFilterInterface
{
Expand Down
12 changes: 6 additions & 6 deletions src/FileSystem.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem;
namespace stk2k\filesystem;

use Serializable;
use JsonSerializable;

use Stk2k\FileSystem\Exception\FileInputException;
use Stk2k\FileSystem\Exception\FileOutputException;
use Stk2k\FileSystem\Exception\FileRenameException;
use Stk2k\FileSystem\Exception\MakeDirectoryException;
use Stk2k\FileSystem\Exception\MakeFileException;
use stk2k\filesystem\Exception\FileInputException;
use stk2k\filesystem\Exception\FileOutputException;
use stk2k\filesystem\Exception\FileRenameException;
use stk2k\filesystem\Exception\MakeDirectoryException;
use stk2k\filesystem\Exception\MakeFileException;

class FileSystem
{
Expand Down
6 changes: 3 additions & 3 deletions src/Filter/CombinedFileFilter.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Filter;
namespace stk2k\filesystem\Filter;

use Stk2k\FileSystem\FileFilterInterface;
use Stk2k\FileSystem\File;
use stk2k\filesystem\FileFilterInterface;
use stk2k\filesystem\File;

class CombinedFileFilter implements FileFilterInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Filter/ExtensionFileFilter.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Filter;
namespace stk2k\filesystem\Filter;

use Stk2k\FileSystem\FileFilterInterface;
use Stk2k\FileSystem\File;
use stk2k\filesystem\FileFilterInterface;
use stk2k\filesystem\File;

class ExtensionFileFilter implements FileFilterInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Filter/ImageFileFilter.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Filter;
namespace stk2k\filesystem\Filter;

use Stk2k\FileSystem\FileFilterInterface;
use Stk2k\FileSystem\File;
use stk2k\filesystem\FileFilterInterface;
use stk2k\filesystem\File;

class ImageFileFilter implements FileFilterInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Filter/IsDirectoryFileFilter.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Filter;
namespace stk2k\filesystem\Filter;

use Stk2k\FileSystem\FileFilterInterface;
use Stk2k\FileSystem\File;
use stk2k\filesystem\FileFilterInterface;
use stk2k\filesystem\File;

class IsDirectoryFileFilter implements FileFilterInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Filter/IsFileFileFilter.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Filter;
namespace stk2k\filesystem\Filter;

use Stk2k\FileSystem\FileFilterInterface;
use Stk2k\FileSystem\File;
use stk2k\filesystem\FileFilterInterface;
use stk2k\filesystem\File;

class IsFileFileFilter implements FileFilterInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Filter/RegExFileFilter.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Filter;
namespace stk2k\filesystem\Filter;

use Stk2k\FileSystem\FileFilterInterface;
use Stk2k\FileSystem\File;
use stk2k\filesystem\FileFilterInterface;
use stk2k\filesystem\File;

class RegExFileFilter implements FileFilterInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Filter/WildcardFileFilter.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
declare(strict_types=1);

namespace Stk2k\FileSystem\Filter;
namespace stk2k\filesystem\Filter;

use Stk2k\FileSystem\FileFilterInterface;
use Stk2k\FileSystem\File;
use stk2k\filesystem\FileFilterInterface;
use stk2k\filesystem\File;

class WildcardFileFilter implements FileFilterInterface
{
Expand Down

0 comments on commit 131d10e

Please sign in to comment.