Hoa central
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Hoa\Stream\IStream\Touchable Interface Reference
Inheritance diagram for Hoa\Stream\IStream\Touchable:

Public Member Functions

 touch ($time=-1, $atime=-1)
 
 copy ($to, $force=self::DO_NOT_OVERWRITE)
 
 move ($name, $force=self::DO_NOT_OVERWRITE, $mkdir=self::DO_NOT_MAKE_DIRECTORY)
 
 delete ()
 
 changeGroup ($group)
 
 changeMode ($mode)
 
 changeOwner ($user)
 

Static Public Member Functions

static umask ($umask=null)
 

Public Attributes

const OVERWRITE = true
 
const DO_NOT_OVERWRITE = false
 
const MAKE_DIRECTORY = true
 
const DO_NOT_MAKE_DIRECTORY = false
 

Detailed Description

Interface .

Interface for touchable input/output.

Definition at line 47 of file Touchable.php.

Member Function Documentation

Hoa\Stream\IStream\Touchable::changeGroup (   $group)

Change file group.

Parameters
mixed$groupGroup name or number.
Returns
bool

Implemented in Hoa\File\Generic, and Hoa\File\Link\Link.

Hoa\Stream\IStream\Touchable::changeMode (   $mode)

Change file mode.

Parameters
int$modeMode (in octal!).
Returns
bool

Implemented in Hoa\File\Generic.

Hoa\Stream\IStream\Touchable::changeOwner (   $user)

Change file owner.

Parameters
mixed$userUser.
Returns
bool

Implemented in Hoa\File\Generic, and Hoa\File\Link\Link.

Hoa\Stream\IStream\Touchable::copy (   $to,
  $force = self::DO_NOT_OVERWRITE 
)

Copy file. Return the destination file path if succeed, false otherwise.

Parameters
string$toDestination path.
bool$forceForce to copy if the file $to already exists. Use the self::*OVERWRITE constants.
Returns
bool

Implemented in Hoa\File\Generic, and Hoa\File\Directory.

Hoa\Stream\IStream\Touchable::delete ( )

Delete a file.

Returns
bool

Implemented in Hoa\File\Generic, and Hoa\File\Directory.

Hoa\Stream\IStream\Touchable::move (   $name,
  $force = self::DO_NOT_OVERWRITE,
  $mkdir = self::DO_NOT_MAKE_DIRECTORY 
)

Move a file.

Parameters
string$nameNew name.
bool$forceForce to move if the file $name already exists. Use the self::*OVERWRITE constants.
bool$mkdirForce to make directory if does not exist. Use the self::*DIRECTORY constants.
Returns
bool

Implemented in Hoa\File\Generic.

Hoa\Stream\IStream\Touchable::touch (   $time = -1,
  $atime = -1 
)

Set access and modification time of file.

Parameters
int$timeTime. If equals to -1, time() should be used.
int$atimeAccess time. If equals to -1, $time should be used.
Returns
bool

Implemented in Hoa\File\Generic.

static Hoa\Stream\IStream\Touchable::umask (   $umask = null)
static

Change the current umask.

Parameters
int$umaskUmask (in octal!). If null, given the current umask value.
Returns
int

Implemented in Hoa\File\Generic.

Member Data Documentation

const Hoa\Stream\IStream\Touchable::DO_NOT_MAKE_DIRECTORY = false

Do not make directory if does not exist.

bool

Definition at line 75 of file Touchable.php.

const Hoa\Stream\IStream\Touchable::DO_NOT_OVERWRITE = false

Do not overwrite file if already exists.

bool

Definition at line 61 of file Touchable.php.

const Hoa\Stream\IStream\Touchable::MAKE_DIRECTORY = true

Make directory if does not exist.

bool

Definition at line 68 of file Touchable.php.

const Hoa\Stream\IStream\Touchable::OVERWRITE = true

Overwrite file if already exists.

bool

Definition at line 54 of file Touchable.php.


The documentation for this interface was generated from the following file: