Sha256: 9f282014dd0cdee2ee027ec4009fe0cfa89e83cc4c7e0c75e212328a76fe6b2a
Contents?: true
Size: 723 Bytes
Versions: 23
Compression:
Stored size: 723 Bytes
Contents
require "os" module Imap::Backup class Serializer; end class Serializer::Directory DIRECTORY_PERMISSIONS = 0o700 attr_reader :relative attr_reader :path def initialize(path, relative) @path = path @relative = relative end def ensure_exists if !File.directory?(full_path) Utils.make_folder( path, relative, DIRECTORY_PERMISSIONS ) end return if OS.windows? return if Utils.mode(full_path) == DIRECTORY_PERMISSIONS FileUtils.chmod DIRECTORY_PERMISSIONS, full_path end private def full_path containing_directory = File.join(path, relative) File.expand_path(containing_directory) end end end
Version data entries
23 entries across 23 versions & 1 rubygems