Using Connectors10% of the exam
File and FTP connector operations and listeners
What File and FTP Read, List, Write, Move and Copy return or throw, how the working directory resolves relative paths, how the On New or Updated File listener avoids reprocessing and half-written files, FTP passive mode, and why repeatable streams let several components read the same file.
Apply correct processors/syntax to connect to files or FTP servers, and predict outcomes.
~8 min read · 10 practice questions ·
What the exam expects
- Predict the payload, attributes and error of File Read, List, Write, Move and Copy, including the
FILE:ILLEGAL_PATHandFILE:FILE_ALREADY_EXISTScases. - Resolve a relative path against the configuration's working directory, and know the default when no configuration is referenced.
- Configure On New or Updated File so files are not picked up twice and half-written files are not read.
- Configure an FTP connection for active mode and a base folder.
- Predict what happens when two components read the same file content, with and without repeatable streaming.
- Key terms: working directory (root of every relative path); watermark mode (listener picks only files created or modified since the last poll); time between size check (two size checks before reading); repeatable stream (buffered content that several components can read); file attributes (metadata such as name, path, size and timestamps).
Key facts
Read a missing file
- Detail
- Throws
FILE:ILLEGAL_PATH; Read does not read directories
No
config-ref- Detail
- Working directory defaults to
user.home; unset means the connector fails to initialize
List output
- Detail
- Array of messages, each with a lazy content stream; no Read needed
Write Mode default
- Detail
OVERWRITE;CREATE_NEWerrors if the file exists
Move/Copy Overwrite
- Detail
- Default
false; existing target throwsFILE:FILE_ALREADY_EXISTS
Create Parent Directories
- Detail
- Default
true;falsewith a missing parent givesFILE:ILLEGAL_PATH
Listener Watermark Mode
- Detail
- Default
DISABLED;MODIFIED_TIMESTAMPorCREATED_TIMESTAMP
Time Between Size Check
- Detail
- Two matching size checks before reading; omitted means no check
FTP Passive
- Detail
- Default
true;falseswitches to active mode
Sources for this section (6)
- Read a File Using the File Connectordocs.mulesoft.com (opens in a new tab)
- List Files Using the File Connectordocs.mulesoft.com (opens in a new tab)
- To Write a File Using the File Connectordocs.mulesoft.com (opens in a new tab)
- Copy and Move Filesdocs.mulesoft.com (opens in a new tab)
- File Connector Referencedocs.mulesoft.com (opens in a new tab)
- FTP Connector 2.0 Referencedocs.mulesoft.com (opens in a new tab)
- What does a File Write's Content default to?
- Why does a size check on a Read happen only when the stream is about to be consumed?
- When is a Write operation's lock released?
- What happens when an in-memory repeatable stream outgrows its maximum buffer?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the MuleSoft Developer pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 40 lessons of the MuleSoft Developer guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Practice exams purchase adds inline bank questions and topic practice (10 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams