Yini  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
WSQFileHelper.h
Go to the documentation of this file.
1 //
2 // WSQFileHelper.h
3 // WSQFileHelperTestProject
4 //
5 // Created by siqi wang on 12-7-8.
6 // Copyright (c) 2012年 siqi wang. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import <DropboxSDK/DropboxSDK.h>
11 #import "BWLord.h"
12 
13 
19 @protocol WSQFileHelperDelegate <NSObject>
20 -(void)loadedFile;
21 
22 @optional
23 //-(void)changeInFileWithName:(DBMetadata *)metadata;
24 -(void)noChange;
25 
26 -(void)loadedNewsList;
27 
28 
29 @end
30 
31 
32 
33 
34 
35 
36 
37 
38 @interface WSQFileHelper : NSObject<DBRestClientDelegate>
39 {
40 
42 
43  NSFileManager *manager;
44  NSString *localCursor;
45  NSMutableDictionary *newsNames;
46 // BOOL loadingMetadata;
47 
48 }
49 
50 
51 @property (nonatomic, strong) id delegate;
52  //
57 +(WSQFileHelper*)sharedHelper;
62 -(NSString*)newsListPath;
63 
67 -(NSString*)localFileDirec;
68 
75 -(void)refresh;
76 
82 -(void)selfDestory;
83 -(void)setDBRootPath:(NSString*)dbP;
84 
85 -(NSString*)directoryForNewsSysFile:(NSString*)name; //pass in any name(media namepath or plist name path...
86 -(NSString*)directoryForNewsMediaFile:(NSString *)name;
87 -(NSString*)sysMetadataPathForNews:(NSString*)name;
88 -(NSString*)mediaMetadataPathForNews:(NSString*)name;
89 -(NSString*)pathNameFromDBPath:(NSString *)path;//returned mixed cases... passed in with both case for root... can be used with db metadata lowercase string, or domestic uses...
90 -(NSString*)sysPathNameFromDBPath:(NSString *)path;
91 -(NSString*)sysFolderAnyFileDirectoryWithOriginalNamePath:(NSString*)oNamePath;//any name, but returned with original path extension...
92 
93 -(NSString*)trimDBRoot:(NSString*)dbFullPath;
94 
95 -(BOOL)sysFileExistForNamePath:(NSString *)np;//passed in with both media and sys namePath... and check if the file with plist extension exist
96 -(BOOL)fileExistInSysFolderWithNamePath:(NSString*)np;
97 
98 -(NSString*)thumbnailPathForNewsNamePath:(NSString*)namePath;
99 -(void)loadThumbnailForDBPath:(NSString*)DBPath;
100 -(void)loadMediaFileForDBPath:(NSString*)dbPath;
101 -(void)loadSysFileForNamePath:(NSString*)nPath;//nPath contain yini system file...
102 
103 
104 
105 @end