Tag

readdir

1 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Dec 29, 2023 · Backend Development

How to Traverse Directories and Retrieve File Information in PHP

This article explains how to use PHP functions such as opendir, readdir, is_dir, and scandir to open directories, read file names, perform recursive traversal of subfolders, and retrieve file information, providing clear code examples for each method.

PHPdirectory traversalopendir
0 likes · 5 min read
How to Traverse Directories and Retrieve File Information in PHP
php中文网 Courses
php中文网 Courses
Oct 20, 2023 · Backend Development

Understanding and Using PHP readdir() Function for Directory Traversal

This article provides a comprehensive guide to PHP's readdir() function, covering its syntax, basic usage with code examples, important considerations such as handling '.' and '..' entries, and advanced techniques like combining with is_dir() to differentiate files and directories for efficient file system operations.

Backend DevelopmentCode ExamplePHP
0 likes · 4 min read
Understanding and Using PHP readdir() Function for Directory Traversal
Laravel Tech Community
Laravel Tech Community
Jul 15, 2021 · Backend Development

PHP readdir Function: Reading Directory Entries

Provides a detailed explanation of PHP's readdir function, including its signature, parameters, return values, and example code demonstrating correct and incorrect ways to iterate through directory entries using a directory handle opened by opendir().

Backend DevelopmentPHPdirectory handling
0 likes · 2 min read
PHP readdir Function: Reading Directory Entries
Laravel Tech Community
Laravel Tech Community
Mar 10, 2021 · Backend Development

PHP readdir() Function: Reading Directory Entries

The PHP readdir() function reads the next entry from an opened directory handle, returning the filename in filesystem order, with details on its parameters, return values, and example code demonstrating correct and incorrect directory traversal techniques.

Backenddirectoryfilesystem
0 likes · 2 min read
PHP readdir() Function: Reading Directory Entries
Tencent Database Technology
Tencent Database Technology
Dec 27, 2017 · Fundamentals

Why ls Slows Down on Directories with Millions of Files and How to Speed It Up Using getdents

The article explains that the ls command becomes slow on directories containing millions of files because it repeatedly calls the getdents system call through readdir, and demonstrates how directly using getdents with a larger buffer can reduce the listing time from several seconds to under one second.

Linuxfilesystemgetdents
0 likes · 10 min read
Why ls Slows Down on Directories with Millions of Files and How to Speed It Up Using getdents