# File lib/puppet/util/selinux.rb, line 190
190:     def find_fs(file)
191:         unless mnts = read_mounts()
192:             return nil
193:         end
194: 
195:         # For a given file:
196:         # Check if the filename is in the data structure;
197:         #   return the fstype if it is.
198:         # Just in case: return something if you're down to "/" or ""
199:         # Remove the last slash and everything after it,
200:         #   and repeat with that as the file for the next loop through.
201:         ary = file.split('/')
202:         while not ary.empty? do
203:             path = ary.join('/')
204:             if mnts.has_key?(path)
205:                 return mnts[path]
206:             end
207:             ary.pop
208:         end
209:         return mnts['/']
210:     end