yana

Description
  Class trees
  Index of elements
  Todo List
core
  Classes
    FormCreator
    Index
    Language
    Object
    Plugin
    PluginManager
    Singleton
    SmartTemplate
    SmartView
    Utility
    Yana
database
  Classes
    DbBlob
    DbCreator
    DbDesigner4
    DbExtractor
    DbQuery
    DbQueryParser
    DbServer
    DbStream
    DbStructure
    FileDb
error_reporting
  Classes
    Alert
    Error
    ErrorUtility
    Log
    Message
    Report
    Warning
file_system
  Classes
    DatFile
    Dir
    Executeable
    File
    FileReadonly
    FileSystemResource
    SML
javascript
  Classes
    AjaxRequest
  Functions
    preview
    yanaAddEventListener
    yanaAddIcon
    yanaCheckEmbTags
    yanaCloseAll
    yanaGetCookie
    yanaGetElementsByClassName
    yanaMaxLength
    yanaMenu
    yanaMenuCookie
    yanaSetCookie
mail
  Classes
    FormMailer
    Mailer
plugins
  Classes
    plugin_blog
    plugin_check
    plugin_db_admin
    plugin_db_tools
    plugin_default_library
    plugin_diagnostics
    plugin_guestbook
    plugin_guestbook_admin
    plugin_ipblock
    plugin_ipblock_admin
    plugin_rss
    plugin_rss_admin
    plugin_sdk
    plugin_search
    plugin_search_admin
    plugin_user
    plugin_user_admin
utilities
  Classes
    Brush
    Counter
    Hashtable
    Image
    Microsummary
    RSS
    RSSitem
    String
  Functions
    checkArgumentList
    cloneArray
    dirlist
    qSearchArray
    untaintInput
    XMLencode
vdrive
  Classes
    Registry
    VDrive
zip
  Classes
    PclZip

phpDocumentor v 1.4.0

YANA Framework for PHPDocs For Class File

### Class File

#### Description

checked reading and writing of file sources
This class adds functionality to write changes on the object to the corresponding file.

- access: public

    Object
       |
       --FileSystemResource
          |
          --FileReadonly
             |
             --File

##### Method Summary

- bool copy (string $destFile, [bool $overwrite = true], [bool $isRecursive = false], [int $mode = 766])
- bool create ()
- bool delete ()
- bool failSafeWrite ()
- int getFilesize ()
- void insert (scalar $text)
- bool isWriteable ()
- int length ()
- bool remove ([string $key = ""])
- bool write ()

#### Direct descendents

Class | Description
--- | ---
DatFile | This class is an alternative to csv files.
DbDesigner4 | DBDesigner 4 import class
SML | Simple Markup Language (SML) Files

#### Methods

##### copy the file to some destination

bool copy (
string $destFile, [bool $overwrite = true], [bool $isRecursive = false], [int $mode = 766]
)

###### List of parameters:

Name | Type | Description
--- | --- | ---
$destFile | string | destination to copy the file to
$overwrite | bool | setting this to false will prevent existing files from getting overwritten
$isRecursive | bool | setting this to true will automatically, recursively create directories in the $destFile string, if required
$mode | int | the access restriction that applies to the copied file, defaults to 0766

###### Description:

This will create a copy of this file on the filesystem. Bool(true) will be returned on success and bool(false) on error.
Possible errors are:

- the destination directory does not exist (and $isRecursive is not provided, or set to false)
- another file with the same name does already exist (and $overwrite is set to false)
- the destination file is not accessible for some other reason

If the directory the desination file would be place in does not exist, and $isRecursive is set to true, it will automatically, recursively create the missing directories. Newly created directories will be set to access restriction 0766. Note that this is unlike the default behaviour, where there is no restriction at all.
Note: instead of a file name in parameter $destFile, you may also provide the name of a directory. In this case the file the current name of the file will be used. The destination directory needs to be terminated by a forward-slash '/'.
The $destFile parameter must not be any longer than 512 characters. It must not contain any but alphanumeric characters.
If you copy a PHP file, note that for security reasons the $mode parameter defaults to 0766, which means the file will not be executable in a UNIX environment (while it may be executable on windows platforms) until you set the $mode parameter to 0777.

- since: 2.8.5
- access: public

##### create the current file if it does not exist

bool create ()

###### Description:

- access: public

##### delete this file

bool delete ()

###### Description:

Returns bool(true) on success and bool(false) on error.

- access: public

##### failSafe writing of data

bool failSafeWrite ()

###### Description:

Automatically restarts writing if the file-resource is temporarily not available after waiting for 0.5 seconds.
The process is aborted if it failed 3 times.

- access: public

##### get size of this file

int getFilesize ()

###### Description:

Returns the size of the file in bytes (from cached value). If an error occurs, bool(false) is returned.

- since: 2.8.5
- access: public

##### insert new content

void insert (
scalar $text
)

###### List of parameters:

Name | Type | Description
--- | --- | ---
$text | scalar |

###### Description:

- access: public

Redefined in descendants as:

- DatFile::insert() : insert (append) an entry to the file
- SML::insert() : insert an array into the file

##### return bool(true) if file is writeable

bool isWriteable ()

###### Description:

A file is "writeable" if:

- the file exists
- it is accessible
- the script has permission to write data to the file

- since: 2.9 RC3
- access: public

##### get the number of contents inside the file

int length ()

###### Description:

- access: public

Redefined in descendants as:

- DatFile::length() : return the number of rows in the file
- SML::length() : get the number of elements

##### remove an entry from the file

bool remove (
[string $key = ""]
)

###### List of parameters:

Name | Type | Description
--- | --- | ---
$key | string | (optional)

###### Description:

- access: public

Redefined in descendants as:

- DatFile::remove() : remove an entry from the file
- SML::remove() : remove an entry from the file

##### write file to system

bool write ()

###### Description:

This function will return bool(true) on success. It issues an E_USER_NOTICE and returns bool(false) on error.

- access: public

##### inherited from base classes

Inherited From FileReadonly

- FileReadonly::failSafeRead()
- FileReadonly::get()
- FileReadonly::getCrc32()
- FileReadonly::getFileContent()
- FileReadonly::getMd5()
- FileReadonly::isEmpty()
- FileReadonly::read()
- FileReadonly::reset()
- FileReadonly::toString()

Inherited From FileSystemResource

- FileSystemResource::FileSystemResource()
- FileSystemResource::equals()
- FileSystemResource::exists()
- FileSystemResource::get()
- FileSystemResource::getLastModified()
- FileSystemResource::getPath()
- FileSystemResource::read()

Inherited From Object

- Object::cloneObject()
- Object::equals()
- Object::getClass()
- Object::serialize()
- Object::toString()

Documentation generated on Sun, 04 Jan 2009 03:48:58 +0100 by phpDocumentor 1.4.0

yana author: Thomas Meyerwww.yanaframework.net