Reading a file to a string couldn't be easier than using the file_get_contents() function. Simple pass the name of the file (with path) and optional parameters
Need to unzip a file? this function can do that for you. It is reccomended that the functions.php file and the file that exicutes the unzip function are NOT in the same directory as the zip files. unzip ( string $zipfile , string $newLocation ) zipfile gets the name of the current zip file. newLocation is where you want to store all the...
How to read text file and print its contents to the console line by line.
Java code example to list the Files or Subdirectories in a Directory
Java code for listing files or sub-directories in a directory
C++ code example shown here how to write to text file.
This MATLAB code snippet reads in a file stored in the current directory and stores specified lines from the file in a new cell array for manipulation in MATLAB.
PHP example for listing directory contents
Search a body of text for the most common words
This function removes all duplicated lines of the given text file.
The .NET Framework doesn't support automatic detection of character encoding in the default file I/O methods. This is a quick function that returns True in the specified file is Unicode.
Copies Source file to Dest file, preserving modification date. Required units: Classes, SysUtils.
This example shows how to serialize a simple object by using the XmlSerializer.
Loads the contents of a dir an sorts them by the date of creation.
The IsFileInUse Delphi function will return true if the file is locked for exclusive access. False is returned if the file does not exist. Code "flow": Two things need to be checked here: A) Is the file a READ-ONLY file? and B) Is the file in use? The main point of the excercise is to check the files attributes for the READ-ONLY...
The IsFileInUse Delphi function will return true if the file is locked for exclusive access. False is returned if the file does not exist. Code "flow": Two things need to be checked here: A) Is the file a READ-ONLY file? and B) Is the file in use? The main point of the excercise is to check the files attributes for the READ-ONLY flag...
Shows how to create a simple file download by using PHP. The content could also be dynamically generated)
For downloading very large files (10 meg or more), split the file into chunks when sending.
C code example for useful macros, functions and tricks
Jave code for PDF Generation using iText JAR