D
Daniel Berger
Hi,
I'm going to add the Filesystem.mount_point method. It will simply
return the mount point associated with the given file.
Example:
Filesystem.mount_point('/home/djberge/foo.txt') # => '/home' (RHEL
Linux)
My dilemma is what I should do when I can't find an associated mount
point. For example, the device number for '/dev' on our RHEL box at
work doesn't match the device number of any of the mount points.
Which of these options seems most appropriate?
1 - Return nil
2 - Return '/'
3 - Return itself, e.g. '/dev' would return '/dev'
4 - Raise an error
Suggestions?
Regards,
Dan
I'm going to add the Filesystem.mount_point method. It will simply
return the mount point associated with the given file.
Example:
Filesystem.mount_point('/home/djberge/foo.txt') # => '/home' (RHEL
Linux)
My dilemma is what I should do when I can't find an associated mount
point. For example, the device number for '/dev' on our RHEL box at
work doesn't match the device number of any of the mount points.
Which of these options seems most appropriate?
1 - Return nil
2 - Return '/'
3 - Return itself, e.g. '/dev' would return '/dev'
4 - Raise an error
Suggestions?
Regards,
Dan