Page 1 of 1
is_deletable function? Check if a file can be deleted
Posted: Mon Apr 06, 2009 7:52 am
by Sindarin
I use the is_writable to determine if a file can be written, but how can I tell if a file can be deleted under a Windows environment? Even if the file has write permissions, it can't be deleted.
Re: is_deletable function? Check if a file can be deleted
Posted: Fri Apr 10, 2009 5:31 pm
by nyoka
You could you the php functions stat or fstat, the element that you want to look at is '2' or 'mode' from the returned associative array.
Re: is_deletable function? Check if a file can be deleted
Posted: Fri Apr 10, 2009 6:04 pm
by requinix
Try is_writable on the parent directory.