Replace file with filespec

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
mael
Registered User
Posts: 76
Joined: Wed Jan 11, 2017 1:21 am
Name: DANY

Replace file with filespec

Post by mael »

Hello mates!

Anyone knows if is possible to replace a file using "physical_filename" into filespec? i only see $file->clean_filename for create a new "realname" but nothing about set an especific name like "22_dasdby1ubfnfutgng". In this way i could replace the an existing file with move_file function

Thanks in advance :)
User avatar
mrgoldy
Former Team Member
Posts: 1394
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: Replace file with filespec

Post by mrgoldy »

Not sure if this is what you mean, but you can rename a file using the "filesystem" service.
You can read more about it in the 3.2.x Code docs | Filesystem: rename
phpBB Studio / Member of the Studio

Contributing: You can do it too! Including testing Pull Requests (PR).
phpBB Development and Testing made easy.
Post Reply

Return to “Extension Writers Discussion”