- Getting Started
- Architecture
- The Basics
- Digging Deeper
-
EDGE Components
- Introduction
- Activity Indicator
- Badge
- Bottom Navigation
- Bottom Sheet
- Button
- Button Group
- Canvas
- Carousel
- Checkbox
- Chip
- Column
- Divider
- Gesture Area
- Icon
- Icons
- Image
- Layout & Styling
- List
- Menus
- Modal
- Pressable
- Progress Bar
- Radio Group
- Row
- Scroll View
- Select
- Shapes
- Side Navigation
- Slider
- Spacer
- Stack
- Tab Row
- Text
- Text Input
- Toggle
- Top Bar
- Virtual List
- Web View
- Plugins
- Testing
- Publishing Your App
You're viewing pre-release documentation — version 4.x is in beta
Features, APIs and behaviour may change before the stable release. View the stable version (3.x)
File
Overview#
The File API performs native file operations — moving and copying files — using each platform's file system
directly.
It's a core built-in: the facade resolves with nothing to install or register.
Copied!
use Native\Mobile\Facades\File;
Move#
Copied!
$ok = File::move('/path/to/source.txt', '/path/to/destination.txt'); // bool
Copy#
Copied!
$ok = File::copy('/path/to/source.txt', '/path/to/copy.txt'); // bool
Both methods return a bool — true on success, false if the operation failed.
| Parameter | Type | Description |
|---|---|---|
from |
string | Source file path |
to |
string | Destination file path |
Behavior#
- Parent directories are created automatically if they don't exist.
- An existing destination file is overwritten.
- File integrity is verified after a copy.
- On Android, if a rename fails across file systems, it falls back to copy + delete.
Example#
Move a recording out of temporary storage into a permanent location:
Copied!
use Native\Mobile\Facades\File; $temp = sys_get_temp_dir().'/recording.m4a';$permanent = storage_path('recordings/recording.m4a'); if (File::move($temp, $permanent)) { // saved}
NativePHP
Bring your
Laravel
skills to the
desktop.
Cloud Platform
Bifrost
Build your NativePHP apps
in the cloud.
Ship it!
Plans from $19/mo
Plugin Dev Kit
Build native plugins with
Claude Code
Learn More
NativePHP Ultra
All NativePHP plugins, teams & priority support from
$35/mo
Learn More
The Vibes
The unofficial Laracon US
Day 3
Grab Your Spot
Only 100 tickets!
The Masterclass
Go from zero to
published app
in no time
in no time
Learn More