All fields

“File System” in Information Technology

72 questions across 9 technologies.

Information Technology

72 questions in 9 technologies

#QuestionTechnologyTopicLevel
1How would you use the WatchService API (java.nio.file) to monitor a directory for file system changes (creation, modification, deletion) in real time? Java › I/O & NIOJavaI/O & NIOIntermediate
2How would you implement the Composite pattern to treat individual objects and groups of objects uniformly, such as a file system with files and directories? Java › Design Patterns in JavaJavaDesign Patterns in JavaIntermediate
3How can a Flutter desktop app properly access the native operating system's own file system, such as letting a user open or save an actual local file, using the file_picker or similar dedicated packages? Flutter › Flutter for Desktop (Windows, macOS, Linux)FlutterFlutter for Desktop (Windows, macOS, Linux)Intermediate
4What is the difference between fs.rename() and manually copying then deleting a file, particularly across different filesystems or drives? Node.js › File System (fs) ModuleNode.jsFile System (fs) ModuleIntermediate
5How do you check whether a file or directory exists, and how do you retrieve useful metadata like a file's size or last modified time? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsIntermediate
6What security risks are associated with file handling operations that involve user supplied file paths, and how does path traversal attack prevention work? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsAdvanced
7What is the difference between fs.readFile() and fs.createReadStream() for reading a file in Node.js? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingBeginner
8How do you read the contents of a file in PHP using functions like file_get_contents and fopen? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsBeginner
9How do you write data to a file in PHP, and what is the difference between overwriting a file and appending to it? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsBeginner
10How would you recursively read all files within a directory tree in Node.js? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
11How would you safely check if a file exists in Node.js before attempting to read it, avoiding a race condition? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
12What is the difference between fs.appendFile() and opening a file with the 'a' flag and writing to it manually? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
13How would you copy a large file efficiently in Node.js, and what's the difference between fs.copyFile() and manually piping streams? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
14What is the purpose of the 'flag' option in fs.writeFile(), and what's the difference between 'w', 'a', and 'wx' flags? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
15How would you read a large file efficiently using a stream rather than loading it entirely into memory with fs.readFile()? Node.js › File System (fs) ModuleNode.jsFile System (fs) ModuleIntermediate
16How do you safely watch a directory or file for changes using fs.watch(), and what are its known cross-platform limitations? Node.js › File System (fs) ModuleNode.jsFile System (fs) ModuleIntermediate
17How can you control access permissions for files and directories stored in EFS? AWS › Amazon EFS (Elastic File System)AWSAmazon EFS (Elastic File System)Intermediate
18How do file locking mechanisms in PHP, using the flock function, help prevent data corruption when multiple processes might write to the same file concurrently? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsIntermediate
19How would you implement a file-watching feature in Node.js using fs.watch(), and what are its known cross-platform limitations? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingAdvanced
20How would you implement atomic file writes in Node.js to avoid leaving a file in a corrupted, half-written state if the process crashes mid-write? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingAdvanced
21How would you process a very large CSV file in Node.js without loading the entire file into memory? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingAdvanced
22How would you implement file locking in Node.js to prevent two processes from writing to the same file simultaneously? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingAdvanced
23How would you implement a directory-size calculator in Node.js that recursively sums the size of all files within a directory tree? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingAdvanced
24How would you implement a simple in-process file-based cache in Node.js, and what are the tradeoffs versus using Redis? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingAdvanced
25What are Node.js file descriptor limits, and how might a Node.js application unintentionally exhaust them? Node.js › File System (fs) ModuleNode.jsFile System (fs) ModuleAdvanced
26How do stream wrappers and stream contexts in PHP allow file functions to work seamlessly with non local resources like remote URLs or cloud storage? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsAdvanced
27How do you use FileSystemWatcher to monitor a directory for file changes, and what are its common reliability pitfalls? C# › File I/O & StreamsC#File I/O & StreamsAdvanced
28What is the performance overhead comparison between SQL Server Profiler, server side traces, and Extended Events, and how should this inform monitoring decisions on a production system? SQL Server › SQL Server Profiler & Extended EventsSQL ServerSQL Server Profiler & Extended EventsAdvanced
29How do you move an uploaded file from its temporary location to a permanent storage location using move_uploaded_file? PHP › File Upload HandlingPHPFile Upload HandlingBeginner
30How do you work with directories in PHP, including listing their contents, creating new directories, and recursively deleting them? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsIntermediate
31How should you validate an uploaded file's type and size before accepting it, and why is checking only the file extension considered insufficient for security? PHP › File Upload HandlingPHPFile Upload HandlingIntermediate
32What is the security risk of trusting a client-supplied filename for an uploaded file, and how do you mitigate it? Node.js › File Uploads & Media ProcessingNode.jsFile Uploads & Media ProcessingAdvanced
33What is the difference between an absolute path and a relative path in Node.js, and how does __dirname help resolve paths reliably? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingBeginner
34What is the difference between fs.unlink() and fs.rmdir() (or the newer fs.rm()) in Node.js? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingBeginner
35What is the difference between the synchronous, callback-based, and promise-based variants of Node's fs module methods? Node.js › File System (fs) ModuleNode.jsFile System (fs) ModuleBeginner
36What is Amazon EFS and how is it different from Amazon S3 or EBS? AWS › Amazon EFS (Elastic File System)AWSAmazon EFS (Elastic File System)Beginner
37What are the different storage classes available in EFS? AWS › Amazon EFS (Elastic File System)AWSAmazon EFS (Elastic File System)Beginner
38What is the difference between fs.stat() and fs.lstat(), and when does the distinction matter? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
39How do EFS mount targets work across multiple Availability Zones? AWS › Amazon EFS (Elastic File System)AWSAmazon EFS (Elastic File System)Intermediate
40How does EFS ensure data durability and availability? AWS › Amazon EFS (Elastic File System)AWSAmazon EFS (Elastic File System)Intermediate
41How does EFS integrate with AWS Lambda and containerized workloads like ECS? AWS › Amazon EFS (Elastic File System)AWSAmazon EFS (Elastic File System)Advanced
42What performance modes and throughput modes are available in EFS, and how do you choose between them? AWS › Amazon EFS (Elastic File System)AWSAmazon EFS (Elastic File System)Advanced
43How do the requires and exports directives in a module-info.java file work together to define a module's dependencies and public API surface? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Intermediate
44What is the difference between 'exports' and 'opens' in a module-info.java file, and why does reflection-heavy code (like many dependency injection or serialization frameworks) specifically require the latter? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Intermediate
45How does the ServiceLoader/Service Provider Interface pattern integrate with JPMS using the 'uses' and 'provides ... with' directives, replacing the older META-INF/services file-based mechanism? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Intermediate
46How do you configure PM2 using an ecosystem.config.js file rather than passing options directly on the command line? Node.js › Deployment & Process Managers (PM2)Node.jsDeployment & Process Managers (PM2)Intermediate
47How can you store session data in a shared storage system like Redis or a database instead of the default local file storage, and why is this often necessary for applications running on multiple servers? PHP › Sessions & CookiesPHPSessions & CookiesAdvanced
48How would you validate an uploaded image's actual dimensions and reject ones that don't meet minimum or maximum size requirements? Node.js › File Uploads & Media ProcessingNode.jsFile Uploads & Media ProcessingIntermediate
49What does path.parse() and path.format() do, and how are they useful for decomposing and reconstructing file paths? Node.js › Path & OS ModulesNode.jsPath & OS ModulesBeginner
50What is a File Gateway, and how does it let on premises applications interact with S3 using standard file protocols? AWS › AWS Storage GatewayAWSAWS Storage GatewayBeginner
51How do you read and write files in MAUI cross-platform? .NET MAUI › Local Storage & Data.NET MAUILocal Storage & DataIntermediate
52How do you read and write files in MAUI cross-platform? .NET MAUI › Local Storage & Data.NET MAUILocal Storage & DataIntermediate
53What does the node:path module provide, and why should you always use it instead of manually concatenating file path strings? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesIntermediate
54What does 'non-blocking I/O' mean, and how does a Node.js function like fs.readFile() achieve it compared to fs.readFileSync()? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
55What is the difference between synchronous and asynchronous versions of the same core Node.js API, using fs.readFile vs fs.readFileSync as an example, and when is the synchronous version actually appropriate? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOIntermediate
56How can you efficiently parse an extremely large XML file that would be too large to comfortably load entirely into memory at once, using a streaming based approach like XMLReader? PHP › XML Handling in PHPPHPXML Handling in PHPAdvanced
57How can Query Store data be queried directly using its underlying system views for custom analysis beyond the built-in reports? SQL Server › Query StoreSQL ServerQuery StoreAdvanced
58What is the node: prefix for core module imports, and why was it introduced? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesBeginner
59What is the difference between path.join() and path.resolve(), and when would you use each? Node.js › Path & OS ModulesNode.jsPath & OS ModulesBeginner
60What is AWS Backup and how does it simplify managing backups across multiple AWS services? AWS › AWS Backup & Disaster RecoveryAWSAWS Backup & Disaster RecoveryBeginner
61What is a generator in PHP, and how does the yield keyword let a function produce a sequence of values without building an entire array in memory at once? PHP › Generators & IteratorsPHPGenerators & IteratorsBeginner
62How do you access command line arguments passed to a PHP script using the $argv and $argc superglobals? PHP › PHP CLI ScriptingPHPPHP CLI ScriptingBeginner
63How do you write cross-platform shell scripts in Node.js that work identically on Windows, macOS, and Linux? Node.js › CLI Tools & Scripting with Node.jsNode.jsCLI Tools & Scripting with Node.jsIntermediate
64How does envelope encryption work in KMS, and why is it used instead of encrypting large amounts of data directly with a KMS key? AWS › AWS KMS & Data EncryptionAWSAWS KMS & Data EncryptionIntermediate
65How does the finally block work alongside try and catch, and what are appropriate use cases for it? PHP › Error & Exception HandlingPHPError & Exception HandlingIntermediate
66How do you control the depth and formatting of json_encode output, such as pretty printing JSON for readability or handling deeply nested data structures? PHP › JSON Handling in PHPPHPJSON Handling in PHPIntermediate
67How does preg_split let you break a string apart into an array using a regular expression as the delimiter, and how does this differ from PHP's simpler explode function? PHP › Regular Expressions in PHPPHPRegular Expressions in PHPIntermediate
68How does the DOM extension provide a more powerful and flexible alternative to SimpleXML when you need to actually modify or construct an XML document rather than only read one? PHP › XML Handling in PHPPHPXML Handling in PHPIntermediate
69What is the node:stream module's Transform stream, and how does it differ from a Readable or Writable stream? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesAdvanced
70How does Fargate support integrating with EFS for tasks that need persistent, shared storage beyond a container's ephemeral storage? AWS › AWS FargateAWSAWS FargateAdvanced
71How does recursion work in PHP functions, and what are the practical considerations, such as stack depth limits, when writing a recursive function? PHP › Functions & ScopePHPFunctions & ScopeAdvanced
72What performance considerations arise when working with very large JSON payloads in PHP, and how do streaming JSON parsers help address them? PHP › JSON Handling in PHPPHPJSON Handling in PHPAdvanced