예제 #1
0
파일: __init__.py 프로젝트: mcruse/monotone
def get_file_type(filename):
    get = FileInfo(('pfileinfo','-v','0',
                    'type','--type-only',property_name,filename))
    result = get.run()
    if result != 0:
        return None
    result = get.get_stdout_msg()
    if len(result) and result[-1] == '\n':
        result = result[:-1]
    return result
예제 #2
0
def get_file_type(filename):
    get = FileInfo(('pfileinfo', '-v', '0', 'type', '--type-only',
                    property_name, filename))
    result = get.run()
    if result != 0:
        return None
    result = get.get_stdout_msg()
    if len(result) and result[-1] == '\n':
        result = result[:-1]
    return result
예제 #3
0
파일: __init__.py 프로젝트: mcruse/monotone
def get_file_property(filename, property_name):
    get = FileInfo(('pfileinfo','-v','0',
                    'get','--value-only',property_name,filename))
    try:
        result = get.run()
    except ECommand:
        return None
    if result != 0:
        return None
    result = get.get_stdout_msg()
    if len(result) and result[-1] == '\n':
        result = result[:-1]
    return result
예제 #4
0
def get_file_property(filename, property_name):
    get = FileInfo(('pfileinfo', '-v', '0', 'get', '--value-only',
                    property_name, filename))
    try:
        result = get.run()
    except ECommand:
        return None
    if result != 0:
        return None
    result = get.get_stdout_msg()
    if len(result) and result[-1] == '\n':
        result = result[:-1]
    return result
예제 #5
0
파일: __init__.py 프로젝트: mcruse/monotone
def set_file_property(filename, property_name, property_value):
    set = FileInfo(('pfileinfo','-v','0',
                    'set',property_name,property_value,filename,filename))
    result = set.run()
    return result
예제 #6
0
def set_file_property(filename, property_name, property_value):
    set = FileInfo(('pfileinfo', '-v', '0', 'set', property_name,
                    property_value, filename, filename))
    result = set.run()
    return result