dmBridge PHP API
DMFile Class Reference
Inheritance diagram for DMFile:

Public Member Functions

Static Public Member Functions


Detailed Description


Constructor & Destructor Documentation

DMFile::__construct ( pathname)
Parameters:
stringpathname

Definition at line 158 of file DMFile.php.


Member Function Documentation

DMFile::__toString ( )
Returns:
string The last path component.

Definition at line 165 of file DMFile.php.

DMFile::equals ( obj)
Parameters:
mixedobj
Returns:
boolean

Definition at line 173 of file DMFile.php.

DMFile::getExtension ( )
Returns:
string

Definition at line 183 of file DMFile.php.

Referenced by getMediaType().

DMFile::getHumanReadableSize ( precision = 2)
Parameters:
intprecision
Returns:
string A human-readable size string in SI units.

Definition at line 195 of file DMFile.php.

DMFile::getLastPathComponent ( )
Returns:
string

Definition at line 221 of file DMFile.php.

Referenced by __toString(), and getExtension().

DMFile::getMediaType ( )

Returns a best guess at the file's media type based on its extension.

Wraps DMMediaType::getTypeForExtension(). May return null.

Returns:
DMMediaType

Definition at line 231 of file DMFile.php.

DMFile::getNameWithoutExtension ( )

Returns the base filename without any extension.

Returns:
string

Definition at line 240 of file DMFile.php.

DMFile::getPathname ( )
Returns:
string

Definition at line 253 of file DMFile.php.

Referenced by equals(), getLastPathComponent(), getNameWithoutExtension(), DMPDFFile::getNumPages(), and getSize().

DMFile::getSize ( )
Returns:
int File size, in bytes.
Exceptions:
DMFileNotFoundException

Definition at line 268 of file DMFile.php.

Referenced by getHumanReadableSize().

static DMFile::getUnitsForByteSize ( byte_size,
standard = "SI" 
) [static]
Parameters:
intbyte_size
stringstandard SI, IEC, or JEDEC
Returns:
string
See also:
getUnitSymbolForByteSize()

Definition at line 26 of file DMFile.php.

static DMFile::getUnitSymbolForByteSize ( byte_size,
standard = "SI" 
) [static]

In all cases, bytes less than one kilobyte are returned with a "b" suffix, per IEEE 1541.

Parameters:
intbyte_size
stringstandard SI, IEC, or JEDEC
Returns:
string
See also:
getUnitsForByteSize()

Definition at line 95 of file DMFile.php.

DMFile::setPathname ( pathname)
Parameters:
stringpathname

Definition at line 260 of file DMFile.php.

Referenced by __construct().


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables