![JAR search and dependency download from the Maven repository](/logo.png)
gems.fssm-0.2.10.lib.fssm.state.file.rb Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sass-maven-plugin Show documentation
Show all versions of sass-maven-plugin Show documentation
Maven Plugin that compiles SASS files
The newest version!
module FSSM::State
class File
attr_reader :path
def initialize(path)
@path = path
end
def refresh(base=nil, skip_callbacks=false)
base ||= @path.to_pathname
used_to_exist, @exists = @exists, base.exist?
# this handles bad symlinks without failing. why handle bad symlinks at
# all? well, we could still be interested in their creation and deletion.
old_mtime, @mtime = @mtime, base.symlink? ? Time.at(0) : base.mtime if @exists
unless skip_callbacks
@path.delete(@path.to_s) if used_to_exist && !@exists
@path.create(@path.to_s) if !used_to_exist && @exists
@path.update(@path.to_s) if used_to_exist && @exists && old_mtime != @mtime
end
end
end
end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy