Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Modifying a directory file

by davidgl (Novice)
on Jan 05, 2018 at 14:24 UTC ( #1206756=note: print w/replies, xml ) Need Help??


in reply to Re: Modifying a directory file
in thread Modifying a directory file

I can't use anything that specifies the file by name as the name is effectively null. Perl tends to have more direct access to system calls and system library functions. I haven't written in C for around 25 years, and never on a Mac, so Perl would be easier.

The approaches I can see are:

a) rename the file

b) remove the inode-equivalent from the directory entry and let fsck fix it. (FS is Apple's HFS+)

c) set the inode use count to zero and let fsck tidy it. (Can a stat() structure be re-written to do that, or is that trapped?)

Thanks, David

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1206756]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2021-03-05 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (108 votes). Check out past polls.

    Notices?