class-Com.Tecnick.File.File

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Class File

Com\Tecnick\File\File

Function to read byte-level data

Namespace: Com\Tecnick\File
Package: File
Category: Library
Copyright: 2015-2015 Nicola Asuni - Tecnick.com LTD
License: GNU-LGPL v3 (see LICENSE.TXT)
Author: Nicola Asuni info@tecnick.com
Since: 2015-07-28
Link: https://github.com/tecnickcom/tc-lib-file
Located at File.php
Methods summary
public Returns
# fopenLocal( string $filename, string $mode )

Wrapper to use fopen only with local files

public 4-byte
# fReadInt( resource $handle )

Read a 4-byte (32 bit) integer from file.

public string
# rfRead( resource $handle, integer $length )

Binary-safe file read. Reads up to length bytes from the file pointer referenced by handle. Reading stops as soon as one of the following conditions is met: length bytes have been read; EOF (end of file) is reached.

public string
# fileGetContents( string $file )

Reads entire file into a string. The file can be also an URL.

public string
# getFileData( string $file )

Reads entire file into a string. The file can be also an URL if the URL wrappers are enabled.

public string
# getUrlData( string $url )

Reads entire remote file into a string using CURL

public array
# getAltFilePaths( string $file )

Returns an array of possible alternative file paths or URLs

protected string
# getAltLocalUrlPath( string $file )

Replace URL relative path with full real server path

protected string
# getAltMissingUrlProtocol( string $file )

Add missing local URL protocol

protected string
# getDefaultUrlProtocol( )

Get the default URL protocol (http or https)

protected string
# getAltPathFromUrl( string $url )

Add missing local URL protocol

protected string
# getAltUrlFromPath( string $file )

Get an alternate URL from a file path

 

© 2004-2017 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy